Hello everyone,
I am creating a short little form that will email the submitted information to someone using MS Outlook mail. I have tested my code and it will email the correct email, email the correct subject, but I have an error somewhere in the "message" section. I have probably just made some idiotic mistake as usual, but I can't find it.
here is the code, the message in the email just reads as the variable $message is written, i.e. "$name /n $email /n $school /n $diet" Where am I going wrong?
<?php
$name = $_REQUEST ['name'] ;
$email = $_REQUEST['email'] ;
$school = $_REQUEST['school'] ;
$diet = $_REQUEST['diet'] ;
$message = '$name /n $email /n $school /n $diet';
mail( "XXXXXXXXX", "Subject: Leadership Seminar Signup",
$message, "From: $email" );
//if "email" is not filled out, display the form
echo "<center><form method='post' action='pages/leadershipform.php'>
Name: <input name='name' type='text' /><br />
Email: <input name='email' type='text' /><br />
School: <input name='school' type='text' /><br />
Special Dietary Needs:
<input name='diet' type='text' />
<br />
<input type='submit' />
</form>";
?>