|
Hey,
I have a basic mail() script I wish to use, but I want to add a checkbox with it if I can, can I do it with this script;
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'];
mail( "", "Subject: $subject",
$message, "From: $email" );
echo "Thank you for filling out the form.";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='checkbox' name='mailing' />Yes, I want to receive further information and updates from jonathonbaker.com<br />
<input type='submit' />
</form>";
}
?>
and where do I have the checkbox info sent to? (I left the email address for it to be sent to out)
__________________
Aslan & Beez Web Design - Today, Tomorrow, Forever
|