wjordan1987 Posted September 28, 2008 Share Posted September 28, 2008 I am having a problem with my PHP form. When I click submit all it does it begin to load. Nothing else. Attached are my source codes [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/126137-php-form-keeps-loading-after-clicking-submit/ Share on other sites More sharing options...
wjordan1987 Posted September 28, 2008 Author Share Posted September 28, 2008 Here is the PHP source incase you don't feel like opening it.. <?php //Subject and Email Variables $emailSubject = 'Crazy PHP Scripting!'; $webMaster = '[email protected]'; //Gathering Data Variables $emailField = $_POST['email']; $nameField = $_POST['name']; $phoneField = $_POST['phone']; $budgetField = $_POST['budget']; $travelersField = $_POST['travelers']; $commentsField = $_POST['comments']; $newsletterField = $_POST['newsletter']; $body = <<<EOD <br><hr><br> Email: $email <br> Name: $name <br> Phone: $phone <br> Budget: $budget <br> Number of Travelers: $travelers <br> Comments: $comments <br> Newsletter: $newsletter <br> EOD; $headers = "From: $email\r\n"; $headers .="Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); //Results rendered as HTML $theResults = <<<EOD <html> <head> <title>JakesWorks - travel made easy-Homepage</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { background-color: #f1f1f1; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: normal; font-weight: normal; color: #666666; text-decoration: none; } --> </style> </head> <div> <div align="left">Thank you for your interest! Your email will be answered very soon!</div> </div> </body> </html> EOD; echo "$theResults"; ?> Link to comment https://forums.phpfreaks.com/topic/126137-php-form-keeps-loading-after-clicking-submit/#findComment-652242 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.