awebb
07-12-2003, 11:24 AM
I am getting TWO emails when the user sends the form info.
One has the fields but no info and the other is correct.
My host tells me the code is "incorrect".
Could anyone tell me if I have made a mistake?
Here is the mail() code:
/* emailing info, first set variables*/
$fname=$HTTP_POST_VARS['firstname'];
$lname=$HTTP_POST_VARS['lastname'];
$startdate1=$HTTP_POST_VARS['startdate1'];
$startdate2=$HTTP_POST_VARS['startdate2'];
$startdate3=$HTTP_POST_VARS['startdate3'];
$startdate4=$HTTP_POST_VARS['startdate4'];
$email=$HTTP_POST_VARS['email'];
$to='webmaster@chinchall.com, admin@chinchall.com';
$subject='Clouseau Booking';
/* The body text */
$content= 'Name: '.$fname.' '.$lname."\n"
.'Week1: '.$startdate1."\n"
.'Week2: '.$startdate2."\n"
.'Week3: '.$startdate3."\n"
.'Week4: '.$startdate4."\n"
.'Email: '.$email."\n";
/* send the info */
mail ($to, $subject, $content);
Any guidance gratefully received.
Andy
One has the fields but no info and the other is correct.
My host tells me the code is "incorrect".
Could anyone tell me if I have made a mistake?
Here is the mail() code:
/* emailing info, first set variables*/
$fname=$HTTP_POST_VARS['firstname'];
$lname=$HTTP_POST_VARS['lastname'];
$startdate1=$HTTP_POST_VARS['startdate1'];
$startdate2=$HTTP_POST_VARS['startdate2'];
$startdate3=$HTTP_POST_VARS['startdate3'];
$startdate4=$HTTP_POST_VARS['startdate4'];
$email=$HTTP_POST_VARS['email'];
$to='webmaster@chinchall.com, admin@chinchall.com';
$subject='Clouseau Booking';
/* The body text */
$content= 'Name: '.$fname.' '.$lname."\n"
.'Week1: '.$startdate1."\n"
.'Week2: '.$startdate2."\n"
.'Week3: '.$startdate3."\n"
.'Week4: '.$startdate4."\n"
.'Email: '.$email."\n";
/* send the info */
mail ($to, $subject, $content);
Any guidance gratefully received.
Andy