450 Posted Topics
Re: [QUOTE=ghostrecog;646037]In javascript we can swap only jpg images? Then what about the gif images. Please help me. By answering my first post so the second post will be solved automatically.[/QUOTE] It's just plain text either way, image type has nothing to do with it. I mean it's not like you … | |
Re: You can treat a session var just like a regular var, so creating a session array follows the same syntax as a regular array. [CODE=php] session_start(); $_SESSION['varname'] = array("cell0", "cell1", "cell2"); $_SESSION['varname'][] = "cell3"; $_SESSION['varname'][] = "cell4"; $_SESSION['varname'][5] = "cell5"; $_SESSION['varname'][6] = "cell6"; print_r($_SESSION['varname']); [/CODE] output = "Array ( [0] … | |
Re: Someone will probably blow me away with some regular expression but this is what I would do for the domain extension: [CODE=javascript] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> function getExtension() { var domainname = document.getElementById('txtDomain').value; … | |
Re: Damn look at all that junk, just to send an email. Sorry, I don't have an answer as I am a php dev. I was just surprised that's all. | |
Re: [QUOTE=adaykin;646247][CODE] var rowItem = document.createElement("<input type=text id=['up' + i]>"); [/CODE][/QUOTE] try this: [CODE=javascript] var inputid = "up" + i; var rowItem = document.createElement('<input type="text" id="' + inputid + '">'); [/CODE] and according to what I've read here, you need to provide valid html for ie, yet that will throw an … | |
Re: I would recommend a javascript solution so it is less hands on. [CODE=javascript] <html> <head> <title>none</title> <script language="javascript" type="text/javascript"> function alterLinks() { links = document.getElementsByTagName("a"); for(i = 0; i < links.length; i++) { if(links[i].href.indexOf("localhost") != -1) { links[i].target = ""; } else { links[i].target = "_blank"; } } } </script> … | |
Re: OK, so the user enters the url into a textbox, hits some type of submit button and a link will then appear on the page referring to that url? How would you like to do this, do you want to save the url to a db and then populate the … | |
Re: May I present my greatest work utility, let me know if you need help using it: [URL="http://us2.php.net/manual/en/function.fread.php"]http://us2.php.net/manual/en/function.fread.php[/URL] [URL="http://us2.php.net/manual/en/function.fclose.php"]http://us2.php.net/manual/en/function.fclose.php[/URL] | |
Re: Does the offline version have access to the internet? | |
Re: I or several others here could build it for you if you are looking to contract it out. For a good job, I'm guessing about 6 weeks for development and 2 weeks for testing. | |
Don't know if this has already been reported but I am using ff3 and on the home page the add in the middle is overlapping the drop down menus. It appears to be only that one add. Screen shot attached. | |
Re: You can use a php loop to fill a javascript array, something like this: [CODE=php] <script language="javascript" type="text/javascript"> var jsarray = Array(<? $jsarray = ""; while ($row = mysql_fetch_assoc($result)) { $jsarray .= "\"" . $row['id'] . "\", "; } $jsarray = substr($jsarray, 0, -2); //eliminate the last ", " echo … | |
Re: faq.php [CODE] <a href="faqview.php?faqpk=12">FAQ Title</a> [/CODE] faqview.php [CODE=php] <? if(!is_numeric($_GET['faqpk'])) { header("location: faq.php"); exit(); } $faqpk = $_GET['faqpk']; $query = "select title, description from faq where faqpk = " . $faqpk; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { echo "<p>".$row["title"]."</p>"; echo "<p>".$row["description"]."</p>"; } ?> [/CODE] | |
This is actually a combination js, php, htaccess question so it could go in either one of those categories. I, like every combo server/client/ajax programmer like to mix my php with my js. I'm just curious about something, I know that you can configure .htaccess to refer to new extensions … | |
Re: If you actually want to delete the cookie at the time the user clicks your log out button, use this: [CODE=php] setcookie("user", "Current User", time()-3600); [/CODE] You're actually modifying the expiration time to be negative instead of positive. | |
Re: There should be enough examples here: [URL="http://us.php.net/features.file-upload"]http://us.php.net/features.file-upload[/URL] | |
Re: Something like this should work [CODE=php] <? $query = //query $result = mysql_query($query); $total = mysql_num_rows($result); for($i = 0; $i < $total; $i++) { if(!file_exists($_SERVER['DOCUMENT_ROOT'] . mysql_result($result, $i, "filename")) { echo mysql_result($result, $i, "filename") . " does not exist<br />"; } } ?> [/CODE] | |
Re: maybe this? [CODE=php]<?php $output=<<<HEREDOC <div> HEREDOC; if($i==2) { $output.=<<<HEREDOC $i is 2 </div> HEREDOC; } echo $output; [/CODE] | |
Re: There are two ways that I know of and that is ajax with javascript and Curl with PHP. Ajax has recently gotten a lot of attention and here is some sample code: Ajax object:(do not modify) [CODE=javascript] //the ajax object for all ajax functions function ajaxObject() { var objectsuccess = … | |
Re: Any kind of submission, to another page or iframe, using post or get is exposed to the possibility of attacks. The only thing that you can do is validate that the data is in the right format. The most effective form of validation is server side because that occurs after … | |
Re: Dude, that is a lot of code for pagination and with no code tags. Here is a simple pagination script, try incorporating that. [code=php]<? $conn = mysql_connect("localhost", "test", "test"); if(!$conn) { echo "could not connect to db<br />"; } mysql_select_db("mydev", $conn) or die("could not select db<br />"); $rowsperpage = 100; … | |
Re: php.net [quote]Note: HTML comments and PHP tags are also stripped. This is hardcoded and can not be changed with allowable_tags .[/quote] You'll have to create your own function. | |
Re: The only thing that you can do with php in this area pull the data down from the database, you are looking for some type of DHTML solution which will include a combination of css and javascript. If you do a google search for DHTML drop down menu, you will … | |
Re: Do the pdfs already exist or are they actually going to dynamically generated? | |
Re: Here are some examples for textboxes, checkboxes, radio buttons and select drop downs: [code=php] <? session_start(); //collect text box values $txtFname = isset($_POST['txtFname'])?$_POST['txtFname']:""; $txtLname = isset($_POST['txtLname'])?$_POST['txtLname']:""; $txtMI = isset($_POST['txtMI'])?$_POST['txtMI']:""; //values for ages select element $ages = array(); $ages[] = "1 - 10"; $ages[] = "11 - 20"; $ages[] = "21 … | |
Re: Break the process into small segments. [LIST=1] [*]handling form submissions with php [*]smart database design structure tutorials [*]mysql sql query structures [*]connecting to a database with php [*]working with strings in php [*]looping through database results in php [/LIST] and use google for each step, you can literally copy the … | |
Re: This is how I would generate those arrays [CODE=php] //$keywordsarray is the array that contains said keywords $twowordphrases = array(); //generate two word phrases for($i = 0; $i < count($keywordsarray); $i += 2) { if(isset($keywordsarray[$i + 1])) { $twowordphrases[] = $keywordsarray[$i] . " " . $keywordsarray[$i + 1]; } } … | |
Re: [QUOTE=veledrom;636984][code] UPDATE def_1 SET Valid = 'Yes' WHERE id IN (SELECT id FROM def_2) AND paid IN (SELECT paid FROM def_2) AND valid IS NULL [/code][/QUOTE] I assume your are talking about the sub-queries. Inner join def_2 to what table, on what condition, in which sub-query? If you can answer … | |
Re: [QUOTE=scorpionz;637210]10:12 AM or 10:12 PM[/QUOTE] This should answer all your questions: [URL="http://us.php.net/manual/en/function.date.php"]http://us.php.net/manual/en/function.date.php[/URL] | |
Re: Also, most of those libraries are designed to make IE more consistent with firefox, firefox is a lot more standards compliant than IE. I usually develop for firefox first, then adjust my code for IE. | |
Re: You should probably use implode, something like this: [CODE=php] foreach($_POST['userid'] as $userid) { if(!is_numeric($userid)) { header("location: " . $_SERVER['PHP_SELF'] . "?error=true"); exit(); } } $query = "delete from table where userid in(" . implode(",", $_POST['userid']) . ")"; [/CODE] | |
Re: did you already check at the software development > c++ forum yet because unless it is web-based, I don't think that you will get much help from a web development forum. | |
Re: [CODE=php] <?php // Database variables $remoteServer = "XYZ"; $remoteuser = "****"; $remotepass = "******"; $remoteDB = "***"; //connection to the database $dbhandle = mysql_connect($remoteServer, $remoteuser, $remotepass) or die("Couldn't connect to SQL Server on $remoteServer"); //select a database to work with $selected = mysql_select_db($remoteDB, $dbhandle) or die("Couldn't open database $remoteDB"); //declare … | |
Re: I usually group them into arrays and enter them into the database as a comma separated list which would be a varchar. [CODE=php] <form action="<? echo $_SERVER['REQUEST_URI']; ?>" method="post"> <p><input type="checkbox" name="sports[]" value="football" /> football<br /> <input type="checkbox" name="sports[]" value="hockey" /> hockey<br /> <input type="checkbox" name="sports[]" value="baseball" /> baseball</p> <p><input type="checkbox" name="soda[]" value="pepsi" … | |
Re: The only way to be sure is to get a copyright, which you can get pretty easily now days from sites like godaddy. | |
Re: I've looked into this before and my final solution was to use a standard text field, use javascript to replace the characters with the desired character and store the actual password to a hidden field. | |
Re: or maybe this will help [URL="http://www.110mb.com/forum/howto-send-emails-using-phpmailer-and-gmail-t14144.0.html"]http://www.110mb.com/forum/howto-send-emails-using-phpmailer-and-gmail-t14144.0.html[/URL] | |
Re: you may need to trigger an onload event to reverse them. | |
Re: I guess that I don't understand. If you were to make a temporary table out of the data that you want pulled down, what would it look like? | |
Re: A datagrid is simply an html table, modified by css to look pretty and could have added functionality with javascript and ajax for autoupdates and what not. It just depends on what kind of functionality you would like to have in your datagrid. | |
Re: I would say you probably want to do something like this: [CODE=sql]select min(visit_date), recordid, fname, lname from artist_details inner join attendance using(recordid) where visit_date < '2008-06-25' and visit_date > '2008-06-23' group by recordid, fname, lname[/CODE] | |
Re: [QUOTE=itdupuis;634507]It seems as though I have been a stronger person having to go through the situations I did, and I am happy with the results.[/QUOTE] I kind of went through the same thing, not death but abandoned by my father at 2 and a hard case latch key from that … | |
Re: [CODE=javascript] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> var timerid = 0; function startTime() { if(timerid) { clearTimeout(timerid); } var tDate = new Date(); if(tDate.getHours() == "12" && tDate.getMinutes() == "00" && tDate.getSeconds() == "00") { … | |
Re: This is how I usually do it. Below you will find my main ajax object and then two different functions, one for get and one for post. [CODE=javascript] //the ajax object for all ajax functions function ajaxObject() { var objectsuccess = true; var xmlHttp; try { // Firefox, Opera 8.0+, … | |
Re: You'll probably find all the documentation right here [URL="http://us.php.net/manual/en/function.fputcsv.php"]http://us.php.net/manual/en/function.fputcsv.php[/URL] | |
Re: I wouldn't guess that this is the place to look for help for a PHP generating tool. But you will find support for that product [URL="http://www.hkvstore.com/phpmaker/support.asp"]here[/URL] | |
Re: if you're using a database, you could use something like this. [CODE=php] <? /* this script is for a postgre database, for mysql replace "pg_" with "mysql_" */ //connection here if(count($_POST) > 0) { if(is_array($_POST['chkCommments'])) { $commentpks = ""; foreach($_POST['chkCommments'] as $commentpk) { $commentpks .= $commentpk . ", "; } … | |
Re: I've never used that script but it sounds like this type of error: I don't see <div>s that match up to these two lines: [CODE=javascript] Rounded("div#second","#EFF6F9","#9BD1FA"); Rounded("div#third","#EFF6F9","#9BD1FA"); [/CODE] :-/ |
The End.