kevin_it Posted January 29, 2007 Share Posted January 29, 2007 I seem to be having a problem with my php. Nothing major, more of a pain then anything. I moved servers recently, but now when I try to submit a form via php it is slow.Let me elaborate some. I have php-5.1.6 and httpd-2.2.2 installed. The website seems to work fine, with this one flaw. I have a simple Contact form that all you need to do is enter in your first and last name, email address, phone number and your general question.The fields are set to the following values: first, last, email_address, contact, inquiry. Within the form I call the code by action="contact.php" and it emails the recipient the values in a formatted email. But when you click on submit, the form hangs and I get the entries following this explination in my error_log. Also note that the script eventually finishes and gets emailed, but it takes a good 10 - 20 seconds to complete. contact_error.html is the error page displayed when a field is not entered.I am sure this is just a setting I am missing or something, but any help to make this submit quicker would be greatly appreciated.error_log:[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: first in /www/contact.php on line 5, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: last in /www/contact.php on line 6, referer: http://216.13.38.124/contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: email_address in /www/contact.php on line 7, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: contact in /www/contact.php on line 8, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: inquiry in /www/contact.php on line 9, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: first in /www/contact_error.html on line 185, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: last in /www/contact_error.html on line 192, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: email_address in /www/contact_error.html on line 198, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: contact in /www/contact_error.html on line 204, referer: contact.php[Mon Jan 29 08:44:41 2007] [error] [client 000.000.000.000] PHP Notice: Undefined index: inquiry in /www/contact_error.html on line 211, referer: contact.phpI posted the lines php seems to be having problems with.contact.php:# grab the POST variables from the HTML form, # put them into PHP variables so we can work with them $first = $_POST['first']; $last = $_POST['last']; $email_address = $_POST['email_address'];$contact = $_POST['contact'];$inquiry = $_POST['inquiry'];I am really at a loss. Thanks everyone.Kevin Link to comment https://forums.phpfreaks.com/topic/36175-solved-php-problem-in-error-log/ Share on other sites More sharing options...
trq Posted January 29, 2007 Share Posted January 29, 2007 They should all be....[code=php:0]if (isset($_POST['first'])) { $first = $_POST['first'];}[/code]or[code=php:0]$first = isset($_POST['first']) ? $_POST['first'] : '';[/code] Link to comment https://forums.phpfreaks.com/topic/36175-solved-php-problem-in-error-log/#findComment-171803 Share on other sites More sharing options...
kevin_it Posted January 29, 2007 Author Share Posted January 29, 2007 Thank you very much I REALLY appreciate it. I hate having people write code for me, but I never saw that error before and was at a loss.Again, thank you it worked perfectly.Kevin Link to comment https://forums.phpfreaks.com/topic/36175-solved-php-problem-in-error-log/#findComment-171814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.