<?php
/* Email Variables */
$emailSubject = Outreach Event';
$webMaster = 'test@webshelby.net';
/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$company = $_POST['company'];
$address = $_POST['address'];
$city= $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$event = $_POST['Event'];
if ($event){
foreach ($event as $e){echo 'You selected ',$t,'<br />';}
}
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Phone: $phone <br>
Company: $company <br>
Address: $address<br>
City: $city <br>
State: $state <br>
Postal Code: $zip <br>
Event: $event <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://www.webshelby.net">
<style type="text/css">
<!--
body {
background-color: #244a30;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fab323;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<blockquote><center>
<img src="/images/logo.jpg" width="311" height="196" />
<div align="center">Registration Complete!<br>
You will return to home page in a few seconds !</div>
</center></blockquote>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
I have a html page with this named rsvp.html:
php file name rsvp.php
<tr>
<td>Select Your Event:</td>
<td>
<select name="Event" size="5" multiple="multiple" id="Event">
<option value="1">S Certification (Day 1)</option>
<option value="2">S Certification (Day 2)</option>
<option value="3">Pre-Qual Meeting (Day 1)</option>
<option value="4">Pre-Qual Meeting (Day 2)</option>
</select> </td>
</tr>
when I select more then one it only gives me the one selected
What am I doing wrong?
I need for it to email me a selected events
/* Email Variables */
$emailSubject = Outreach Event';
$webMaster = 'test@webshelby.net';
/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$company = $_POST['company'];
$address = $_POST['address'];
$city= $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$event = $_POST['Event'];
if ($event){
foreach ($event as $e){echo 'You selected ',$t,'<br />';}
}
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Phone: $phone <br>
Company: $company <br>
Address: $address<br>
City: $city <br>
State: $state <br>
Postal Code: $zip <br>
Event: $event <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://www.webshelby.net">
<style type="text/css">
<!--
body {
background-color: #244a30;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fab323;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<blockquote><center>
<img src="/images/logo.jpg" width="311" height="196" />
<div align="center">Registration Complete!<br>
You will return to home page in a few seconds !</div>
</center></blockquote>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
I have a html page with this named rsvp.html:
php file name rsvp.php
<tr>
<td>Select Your Event:</td>
<td>
<select name="Event" size="5" multiple="multiple" id="Event">
<option value="1">S Certification (Day 1)</option>
<option value="2">S Certification (Day 2)</option>
<option value="3">Pre-Qual Meeting (Day 1)</option>
<option value="4">Pre-Qual Meeting (Day 2)</option>
</select> </td>
</tr>
when I select more then one it only gives me the one selected
What am I doing wrong?
I need for it to email me a selected events