Contact Form 404 Error
-
I have a simple contact form, and it could send email before my WP installation. The site didn’t used to be a WP site.
The contact form is on the contact page, and the action of the form is set to ../send_email.
I get a 404 error when I get to the send_email page, but only if the script checks or tries to get anything from the $_POST array. I need help, because I can’t go to sleep until I get this working, and it’s 2:21AM!
I have this on page.php:
if(is_page('send_email') && !empty($_POST)) { $to = '[email protected]'; $from = (empty($_POST['email']))? '[email protected]':$_POST['email']; $message = (!isset($_POST['message']))? 'Request For More Information':$_POST['message']; $headers = "From: $from\r\n"; $headers .= "Reply-To: $from\r\n"; $headers .= "Return-Path: $from\r\n"; $headers .= "X-Mailer: PHP mail on mydomain.com\r\n"; $message = " Name: {$_POST['name']} Phone: {$_POST['phone']} Email: {$_POST['email']} $message "; $success = mail($to,'Contact From Website',$message,$headers); }
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Contact Form 404 Error’ is closed to new replies.