Posts: 1,832
Location: Somewhere else entirely
|
At the moment you are not putting anything in the message variable? It's not anything special, it's just the contents of your message, so you can put checkbox and radio button stuff in there.
Your radio buttons are fine, but your checkboxes either need to have independent names (a value is not necessary since the 'value' can only be on or off) or they need to be submitted as an array. For a small number of CBs, it's simpler just to name them Monday, Tuesday.... etc
The post variable is then either set or unset depending on whether it was checked or not.
Along the lines of :
PHP Code:
if (isset($_POST['submit'])){
if ($_POST['Name'] == ''){
echo "Please enter a name!";
} else {
if ($_POST['Email Address'] == '') {
echo "Please enter an email!";
} else {
$message .="Has Shoutcast: ".$_POST['Shoutcast']."\n";
$message .="Has Used SC to DJ: ".$_POST['UsedSC']."\n";
//etc...
$message .= "Is available on the following days:\n";
if(isset($_POST['Monday'])) $message.="Monday, ";
if(isset($_POST['Tuesday'])) $message.="Tuesday, ";
//etc...
mail("crazydog115@yahoo.com", "Subject", "$email", "My name is, $name\nEmail: $email\n Message: $message");
echo("Thank you for your submission.");
}
}
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Please login or register to view this content. Registration is FREE (aka MSN handwriting for forums)
|