Hi, all...
I have been using the following script to send form data on my Linux server for some time. I put it on someone else's server (Linux) and updated all of the form fields, etc and it is not working - upon submitting the form, I get the following errors:
Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/29/5234029/html/reg/contact.php on line 50
Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/5234029/html/reg/contact.php:50) in /home/content/29/5234029/html/reg/contact.php on line 64The script is:
<?php $to = "
email@email.com";
$subject = "New Attendees";
$attendee1 = $_REQUEST['attendee1'];
$course1 = $_REQUEST['course1'];
$email1 = $_REQUEST['email1'];
$attendee2 = $_REQUEST['attendee2'];
$course2 = $_REQUEST['course2'];
$email2 = $_REQUEST['email2'];
$attendee3 = $_REQUEST['attendee3'];
$course3 = $_REQUEST['course3'];
$email3 = $_REQUEST['email3'];
$message = $_REQUEST['message'];
$headers= " From: $email1 \n";
$totalmessage = "
Attendee 1: $attendee1 \n
Course: $course1 \n
Email: $email1 \n
Attendee 2: $attendee2 \n
Course: $course2 \n
Email: $email2 \n
Attendee 3: $attendee3 \n
Course: $course3 \n
Email: $email3 \n
Comments: $message \n";
$sent = mail($to, $subject, $headers, $totalmessage);
if ($sent) { ob_start();
header("Location:
http://www.mywebsite.com/TESTDUMP/thanks.html");
ob_flush();
} else {
ob_start();
header("Location:
http://www.mywebsite.com/TESTDUMP/oops.html");
ob_flush();
}
?>
Does anyone have any ideas?
Thanks in advance!
~Erin