Jump to content

voip03

Members
  • Posts

    693
  • Joined

  • Last visited

Everything posted by voip03

  1. You need JavaScript to capture the user time (PC Time) and use AJAX to send the time to server.
  2. you can develop from this code. <html> <head> <script type="text/javascript"> function validateForm() { var x=document.forms["imageUpload"]["thumbid"].value; alert(x); } </script> </head> <body> <?php $shirtid=5; // Demo Value only ?> <form name="imageUpload" action="#" onsubmit="return validateForm()" method="post"> <input type="hidden" name="thumbid" value="<? echo $shirtid; ?>" /> <input type="submit" value="Submit"> </form> </body> </html> PS. There is no need to declare ' <?php ...?>' in every line. One start and end will do.
  3. can you post your code.( pl use code tage)
  4. It's like cooking, You add all the ingredients to make beautiful dishes.In cooking there are no strict rules ,you make dishes as you please. In the web world you can use HTML,PHP, MySQL, Javascript,CSS.. to produce Webpages.
  5. Your calling undefined function image() //hor line image($image, 0, 0, $width, $height, $grey); image($image, 0, $height, $width, 0, $grey);
  6. Advanced PHP Form Input Validation http://www.devshed.com/c/a/PHP/Advanced-PHP-Form-Input-Validation-to-Check-User-Inputs/ Good Luck
  7. Never trust the user and always validate user input At the user end you can use JavaScript to validate the input, at the sever side PHP can be use. 1.Input fields are not empty if(!empty($_POST["FirstName"])) { not empty} 2. Email validation //Validate an E-mail Address function check_email_address($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } 3.PHP and Radio Buttons <?PHP $male_status = 'unchecked'; $female_status = 'unchecked'; if (isset($_POST['Submit1'])) { $selected_radio = $_POST['gender']; if ($selected_radio = = 'male') { $male_status = 'checked'; } else if ($selected_radio = = 'female') { $female_status = 'checked'; } } ?> The HTML FORM code: <FORM name ="form1" method ="post" action ="radioButton.php"> <Input type = 'Radio' Name ='gender' value= 'male' <?PHP print $male_status; ?> >Male <Input type = 'Radio' Name ='gender' value= 'female' <?PHP print $female_status; ?> >Female <P> <Input type = "Submit" Name = "Submit1" VALUE = "Select a Radio Button"> </FORM>
  8. Two database connection ? Yes you can.
  9. check 'avatar' name in the code& db
  10. what is the code in 277
  11. $_POST['s'] isn't set. Try doing if(isset($_POST['s'])) { .... }
  12. echo = you need submit button
  13. <? $file = 'http://www.phpfreaks.com/forums/index.php?topic=342214.0'; $file_headers = @get_headers($file); if($file_headers[0] == 'HTTP/1.1 404 Not Found') { $exists = false; echo "not found"; } else { $exists = true; echo " found"; } ?>
  14. This is a good one. http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme for your ref: http://www.techtipsdigital.com/wordpress-contact-form-7-plugin-tutorial/337/ http://www.idiotproofblogging.com/wordpress/contact-form-7-wordpress-install-tutorial.html
  15. You can use rand() select table. http://php.net/manual/en/function.rand.php
  16. Try a mysql_unbuffered_query() rather than mysql_query(). Your query is probably returning too much data as is for your php server to handle
  17. ok have recived the code ?
  18. I could not worked your codes, can you split your job in to 3 or 4
  19. For your reading http://www.phpfreaks.com/forums/index.php?topic=342143.0
  20. Have you tried 1st code then try this code if(!empty($_REQUEST['interest'])) { $imploded_interest = implode(',',$interest); } else { $imploded_interest =0; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.