I have the mail() function working (hooray!) but it seems to send twice.
The first time there are the fields but with nothing in them and then in the second the fields are properly populated.
Any ideas?
Heres the code:
/* emailing info, first set variables*/
$fname=$HTTP_POST_VARS['firstname'];
$lname=$HTTP_POST_VARS['lastname'];
$startdate=$HTTP_POST_VARS['startdate'];
$weeks=$HTTP_POST_VARS['weeks'];
$email=$HTTP_POST_VARS['email'];
$toaddress='webmaster@sitename.com';
$fromaddress='Clouseau';
$subject='New Booking';
/* The body text */
$content= 'Name: '.$fname.' '.$lname."\n"
.'Starting: '.$startdate."\n"
.'Weeks: '.$weeks."\n"
.'Email: '.$email."\n";
/* send the info */
mail ($toaddress, $subject, $content, $fromaddress);
Bookmarks