Wont send variables..
Posted: Sun Nov 09, 2003 8:59 pm
Below is my event creator script
It will mail the beginning text just fine.. "Name" and such, but it wont show $sender_name or any of the other variables.
Code: Select all
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<title>MLDJ - Entertainment</title>
<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>
<body>
<?php
$socialcorp=$_GET['socialcorp'];
$formtype=$_GET['formcas'];
$inorout=$_GET['inout'];
$typeserv=$_GET['djkarserv'];
$lights=$_GET['lightyn'];
$form_block = "
<FORM METHOD="post" ACTION="http://site.com">
<font name="verdana" size="1">
<strong>Contact Information :</strong><br><br>
<strong>Name:</strong><br>
<INPUT type="text" NAME="sender_name" VALUE="$sender_name" SIZE=30></p><br>
<strong>E-Mail and/or Phone#:</strong><br>
<INPUT type="text" NAME="sender_email" VALUE="$sender_email" SIZE=30></p><br>
<strong>Event Information :</strong><br><br><br>
<strong>What is your event?</strong><br>
<INPUT type="text" NAME="whatevent" VALUE="$whatevent" SIZE=30></p><br>
<strong>Social or Corporate?</strong><br>
<INPUT type="radio" NAME="socialcorp" VALUE="Social"> Social<br>
<INPUT type="radio" NAME="socialcorp" VALUE="Corporate"> Corporate<br><br>
<strong>Formal, semi-formal, or casual?</strong><br>
<INPUT type="radio" NAME="formcas" VALUE="Formal"> Formal<br>
<INPUT type="radio" NAME="formcas" VALUE="semi-formal"> Semi-Formal<br>
<INPUT type="radio" NAME="formcas" VALUE="casual"> Casual<br><br>
<strong>Inside or Outside?</strong><br>
<INPUT type="radio" NAME="inout" VALUE="Inside"> Inside<br>
<INPUT type="radio" NAME="inout" VALUE="Outside"> Outside<br><br>
<strong>When will your event occur?</strong><br>
<INPUT type="text" NAME="whenoccur" VALUE="$whenoccur" SIZE=30><br><br>
<strong>How many people do you expect to come?</strong><br>
<INPUT type="text" NAME="amtpeeps" VALUE="$amtpeeps" SIZE=30><br><br>
<strong>Would you lile DJ services, Karaoke services or both?</strong><br>
<INPUT type="radio" NAME="djkarserv" VALUE="DJ Services"> DJ Services<br>
<INPUT type="radio" NAME="djkarserv" VALUE="Karaoke Services"> Karaoke Services<br>
<INPUT type="radio" NAME="djkarserv" VALUE="Both"> Both<br><br>
<strong>Would you like lighting?</strong><br>
<INPUT type="radio" NAME="lightyn" VALUE="Yes"> Yes<br>
<INPUT type="radio" NAME="lightyn" VALUE="No"> No<br><br>
<strong>What kind of price range are you looking at?</strong><br>
<INPUT type="text" NAME="prange" VALUE="$pricerange" SIZE=30><br><br>
<strong>How long will your event occur?</strong><br>
<INPUT type="text" NAME="amttime" VALUE="$amttime" SIZE=30><br><br>
<strong>Age of guests?</strong><br>
<INPUT type="text" NAME="guestage" VALUE="$guestage" SIZE=30><br><br>
<strong>Genre of music you prefer?</strong><br>
<INPUT type="text" NAME="mustype" VALUE="$mustype" SIZE=30><br><br>
<strong>Additional Comments:</strong><br>
<TEXTAREA NAME="comments" COLS=30 ROWS=5 WRAP=virtual>$comments</TEXTAREA>
<INPUT type="hidden" name="op" value="ds">
<INPUT TYPE="submit" NAME="submit" VALUE="Send" class=buttons></p>
</font>
</FORM>
";
echo "$form_block";
if ($send != "no") {
// this is the info that comes on the email when it's ok to send!
$msg .= "Client Information:\n\n";
$msg .= "Name: $sender_name\n";
$msg .= "E-Mail and/or Phone#: $sender_email\n\n";
$msg .= "Event Information:\n\n";
$msg .= "Type of event: $whatevent\n";
$msg .= "Type of event: $whatevent\n";
$msg .= "Social or Corporate: $socialcorp\n";
$msg .= "Formal, semi-formal, casual: $formtype\n";
$msg .= "Inside or Outside: $inorout\n";
$msg .= "Date of event: $whenoccur\n";
$msg .= "Amount of people: $amtpeeps\n";
$msg .= "DJ services, Karaoke services, Both: $typeserv\n";
$msg .= "Lighting: $lights\n";
$msg .= "Price range: $pricerange\n";
$msg .= "Length of event: $amttime\n";
$msg .= "Age of guests: $guestage\n";
$msg .= "Genre of music: $mustype\n";
$msg .= "Comments: $comments\n\n";
$to = "mailname@mail.com";
$subject = "MLDJ Event";
$mailheaders = "From: $sender_name\n \n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
}
?>
</body>
</html>