Forum Moderators: coopster
# error checking
if(!$_POST['name']) {
$error1 = '<p>Please Fill in the Name field</p>';
} /*check to make sure name is filled in, if not display error message on form as error1*/
if(!$_POST['email']) {
$error2 = '<p>Please fill in the email field</p>';
} /*check to make sure email is filled in, if not display error message on form as error2*/
if(!$_POST['namerequested']) {
$error3 = '<p>Please fill in the name you would like on your tag</p>';
} /*check to make sure a suggestion is filled in, if not display error message on form as error3*/
if(!$_Post['tagrequest'])
if(!$error1 &&!$error2 &&!$error3) {
$toaddress = 'dee@mysite.com';
$subject = 'Tag Request';
$mailcontent = 'Customer name: '.$name."\n"
.'Customer email: '.$email."\n"
.'Tag requested: '.$tagrequest."\n"
.'Name on Tag: '.$namerequested."\n";
$fromaddress = 'From: discussions@mysite.com';
if (mail($toaddress, $subject, $mailcontent, $fromaddress))
header("Location: thankyou.php"); //error testing ended
}
#############################
Then under that in the script is the form with the other information on it. I cant seem to get this
<input type="hidden" name="tagrequest" value="pmstemptag">
from the first form to the script to be included in the email
Anyone see what Im missing
Pat
echo $mailcontent;//to check the content.
It's not safe to set the auto variable from $_POST and $_GET. better to assign them manually!
Moreover you forgot the parenthesis { after your if(!$target...) but if it's not set, then why do you use it?
Best regards
Michal Cibor