i have this page... http://www.nodents.com/paintless_dent_repair_courseenrollment.html and i have this for generating it... <? if ($REQUEST_METHOD == "POST") { // Just to be safe, I strip out HTML tags $realname = strip_tags($realname); $email = strip_tags($email); $feedback = strip_tags($feedback); // set the variables // replace $me@mysite.com with your email $sendto = "$benjijaded123@yahoo.com"; $subject = "Paintless Dent Repair Course Enrollment"; $message = "$fullname, $email\n\n$dayphone"; // send the email mail($benjijaded123@yahoo.com, $Paintless Dent Repair Course Enrollment, $fullname, $email\n\n$dayphone); } ?> however i keep getting this... The requested URL /< was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. can someone help me figure out what's wrong with the way i coded this? thanks!
You can't have in a page that ends in .html (unless you get fancy with the .htaccess file) And since this is in the action of your opening form tag, your server is dutifully indicating that no such page exists. View the source of the file you linked to and you'll see what I mean.
surefire i see what you mean..i got rid of that but the result is the same but with this error... The requested URL /METHOD= was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
can anyone put there 2cents into this? really need to get this form up and running. i had to create this form in php and i'm not a php guru but i got it to the point now when you click on submit it won't give me a parsing error. but it stays on the same page and does nothing. help anyone?
<form action="method="post"> Code (markup): must be something like <form action="sendmail.php" method="post"> Code (markup): , or whatever is the name of your mail script.
You have <form action="method="post"> HTML: This is wrong, you have empty action and unclosed quotes. You need something like that: <form action="yourfile.php" method="post"> HTML: Try this: <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> PHP:
thanks guys alot for the responses... i tried this <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> but it's still not working. should i have it as... http://www.nodents.com/paintless_dent_repair_courseenrollment.html or http://www.nodents.com/paintless_dent_repair_courseenrollment.php ???? should it be a php page or an html page? with the php page it's not going anywhere when i click submit but with the html page it's giving me this error again... The requested URL /< was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Change page extension: http://www.nodents.com/paintless_dent_repair_courseenrollment.html to http://www.nodents.com/paintless_dent_repair_courseenrollment.php everything should work fine Peace,
it didn't work...so i changed the form entirely to this... "From: $_POST"; $sub1 = 'New comment (nodents.com)'; $message1 = 'Full Name : ' .$_POST["fullname"] ."\r\n"; $message1 .= 'Email : ' .$_POST["email"] ."\r\n"; $message1 .= 'Day Phone : ' .$_POST["dayphone"] ."\r\n"; $message1 .= 'Mailing Address : ' .$_POST["mailingaddress"] ."\r\n"; $message1 .= 'Desired Date(s) : ' .$_POST["desireddate"] ."\r\n"; $message1 .= 'Location(s) : ' .$_POST["location"] ."\r\n"; $message1 .= '50% deposit provided by : ' .$_POST["50%depositprovidedby"] ."\r\n"; mail ($admin_email, $sub1, $message1, $headers1); header("Location: http://nodents.com/thank_you.html"); exit; } ?> i called that sendmails.php. now i get this error... "From: $_POST[Email]"; $sub1 = 'New comment (nodents.com)'; $message1 = 'Full Name : ' .$_POST["fullname"] ."\r\n"; $message1 .= 'Email : ' .$_POST["email"] ."\r\n"; $message1 .= 'Day Phone : ' .$_POST["dayphone"] ."\r\n"; $message1 .= 'Mailing Address : ' .$_POST["mailingaddress"] ."\r\n"; $message1 .= 'Desired Date(s) : ' .$_POST["desireddate"] ."\r\n"; $message1 .= 'Location(s) : ' .$_POST["location"] ."\r\n"; $message1 .= '50% deposit provided by : ' .$_POST["50%depositprovidedby"] ."\r\n"; mail ($admin_email, $sub1, $message1, $headers1); header("Location: http://nodents.com/thank_you.html"); exit; } ?> can someone advise?