hello…
Building a website for my local area of NA; & need lots of forms…learned form coding on my own…testing the site on one of my music site servers…my first form is basic, but covers all the info I need returned…(click on the ‘GROUP ANNIVERSARY FORM’ link…top right): http://www.moonjams.net/events5.html
So…When info is entered in all fields; & the SUBMIT button is hit…the info is sent to my e-mail address; & the thank you page pops up. Trouble is, in the e-mail I receive…I’m only getting data from two fields…the ‘time’ of the anniversary and the ‘event description’, which are the last two fields.
Here is the form page code:
[php]
Group Anniversary Form:
Home Group Name:
Home Group Address:
# of Years Celebrating:
Anniversary Day & Date:
Anniversary Time:
Briefly Decribe the Event:Thank you!
if(empty($message)||empty($name))
{
echo “Home Group Name and all relative info is mandatory!”;
exit;
}
$email_from = ’ ';
$email_subject = “Events Page New Form Submission”;
$email_body = “You have received Events information from $name.\n”.
“Here is the message:\n $message”.
$to = "[email protected]";
$headers = “From: $email_from \r\n”;
$headers .= “Reply-To: $visitor_email \r\n”;
mail($to,$email_subject,$email_body,$headers);
header(‘Location: thank-you.html’);
function IsInjected($str)
{
$injections = array(’(\n+)’,
‘(\r+)’,
‘(\t+)’,
‘(%0A+)’,
‘(%0D+)’,
‘(%08+)’,
‘(%09+)’
);
$inject = join(’|’, $injections);
$inject = “/$inject/i”;
if(preg_match($inject,$str))
{
return true;
}
else
{
return false;
}
}
?>
<!doctype html>
mark4man