Here is my problem.
I created a simple contact form and right now when I hit send it:
Sends the email, message and information correctly, however it does not resolve to the thank you page.
I know I am missing something but not sure what so I have included a bit of info below: .
From the form: The submit action is below:
<td><input type="submit" name="submit" value="Submit" /></td>
PHP Form Processing File:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
// Pick up the form data and assign it to variables
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
// Build the email (replace the address in the $to section with your own)
$to = '#*$!#*$!@yahoo.com';
$subject = "New Message: $topic";
$message = "$name said: $comments";
$headers = "From: $email";
// Send the mail using PHPs mail() function
mail($to, $subject, $message, $headers);
Line 19 is the header line:
Warning: Cannot modify header information - headers already sent by (output started at /home/supersk/public_html/#*$!#*$!.com/contact_us/process_form.php:3) in /home/supersk/public_html/#*$!#*$!.com/contact_us/process_form.php on line 19
I feel so stupid and know that it will take seconds for someone to spot my error, back after hours of reading, testing and making zero headway. I thought I would ask for help. (Thanks in advance)