Forum Moderators: coopster
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="Namo WebEditor">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration</title>
<style type="text/css">
<!--
body {
height:100%;
width:100%;
z-index:100;
}
table#reunion {
z-index:1;
}
table#reunion p {
font-family:Arial;
font-size:14pt;
margin-top:0;
margin-bottom:0;
}
-->
</style>
</head>
<body>
<form method="POST" action="../Registration.php" id="registration-form"><table id="registration" cellspacing="0">
<tr>
<td align="center">
<img src="../images/image.jpg" border="0"></td>
<td align="center" valign="middle"><p>Title</p></td>
</tr>
<tr><td> </td></tr>
<tr>
<td align="center" colspan="2">
<p>Date of event</p>
</td>
</tr>
<tr><td> </td></tr>
<td align="left" colspan="2">
<p>Event details</p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2">
Full Name <input type="text" name="name1"size="38%">
</td>
</tr>
<tr>
<td colspan="2">
Phone <input type="text" name="phone1" size="38%">
</td>
</tr>
<tr>
<td colspan="2">
Email <input type="text" name="email1" size="38%">
</td>
</tr>
<tr>
<td colspan="2">Choose your entree <input type="radio" name="entree1" value="Chicken">Chicken <input type="radio" name="entree1" value="Fish">Fish <input type="radio" name="entree1" value="Beef">Beef
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2">
Full Name <input type="text" name="name2"size="38%">
</td>
</tr>
<tr>
<td colspan="2">
Phone <input type="text" name="phone2" size="38%">
</td>
</tr>
<tr>
<td colspan="2">
Choose your entree <input type="radio" name="entree2" value="Chicken">Chicken <input type="radio" name="entree2" value="Fish">Fish <input type="radio" name="entree2" value="Beef">Beef
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2" align="center">
<p>Make check payable to</p>
<p> Mail Check to:</p>
<p>Name</p>
<p>address</p>
<p>city, state, zip</p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Register">
</td>
</tr>
</form>
</table>
</body>
</html>
<?php
$message = "";
if(isset($_POST['submit'])){
$to = "example@example.com"; // Your email address
$name = $_POST['name1'];
$from = $_POST['email1'];
$phone = $_POST['phone1'];
$message = "<!DOCTYPE html>
<head>
<style type="text/css">
<!--
body {
height:100%;
width:100%;
z-index:100;
}
table#reunion {
z-index:1;
}
table#reunion p {
font-family:Arial;
font-size:14pt;
margin-top:0;
margin-bottom:0;
}
-->
</style>
</head>
<body>
<form method="POST" enctype="text/plain">
<table id="reunion" cellspacing="0">
<tr>
<td align="center">
<img src="../images/image.jpg" border="0"></td>
<td align="center" valign="middle"><p>Title</p></td>
</tr>
<tr><td> </td></tr>
<tr>
<td align="center" colspan="2">
<p>Date of event</p>
</td>
</tr>
<tr><td> </td></tr>
<td align="left" colspan="2">
<p>Event details</p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2">
<p><".$_POST["name1"]."</p>
<p><".$_POST["entree1"]."></p>
<p><".$_POST["phone1"]."</p>
<p><".$_POST["email1"]."</p>
</td>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2">
<p><".$_POST["name2"]."</p>
<p><".$_POST["entree2"]."></p>
<p><".$_POST["phone2"]."</p>
<p><".$_POST["email2"]."</p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2" align="center">
<p>Make check payable to</p>
<p> Mail Check to:</p>
<p>Name</p>
<p>address</p>
<p>city, state, zip</p>
</td>
</tr>
<tr><td> </td></tr>
</table>
</body>
</html>";
$subject = "Registration";
// Set content-type header for sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= "From:" . $from . "\r\n";
$result = mail($to,$subject,$message,$headers);
if ($result) {
// $message = "Your Message was sent Successfully!";
echo '<script type="text/javascript">alert("Your Message was sent Successfully!");</script>';
echo '<script type="text/javascript">window.location.href = window.location.href;</script>';
}else{
// $message = "Sorry! Message was not sent, Try again Later.";
echo '<script type="text/javascript">alert("Sorry! Message was not sent, Try again Later.");</script>';
echo '<script type="text/javascript">window.location.href = window.location.href;</script>';
}
header('Location: Confirmation.html');
}
?>
<?php
$message = "";
if(isset($_POST['submit'])){
$to = "example@example.net"; // Your email address
$name1 = $_POST['name1'];
$emai11 = $_POST['email1'];
$phone1 = $_POST['phone1'];
$name2 = $_POST['name2'];
$entree2 = $_POST['entree2'];
$phone2 = $_POST['phone2'];
$email2 = $_POST['email2'];
$message = "<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table id="reunion" cellspacing="0">
<tr>
<td align="center">
<img src="../images/image.jpg" border="0"></td>
<td align="center" valign="middle"><p>Title</p></td>
</tr>
<tr><td> </td></tr>
<tr>
<td align="center" colspan="2">
<p>Date of event</p>
</td>
</tr>
<tr><td> </td></tr>
<td align="left" colspan="2">
<p>Event details</p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan='2'>
<p><?php echo $name1?></p>
<p><?php echo $entree1?></p>
<p><?php echo $phone1?></p>
<p><?php echo $email1?></p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan='2'>
<p><?php echo $name2?></p>
<p><?php echo $entree2?></p>
<p><?php echo $phone2?></p>
<p><?php echo $email2?></p>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="2" align="center">
<p>Make check payable to</p>
<p> Mail Check to:</p>
<p>Name</p>
<p>address</p>
<p>city, state, zip</p>
</td>
</tr>
<tr><td> </td></tr>
</table>
</body>
</html>";
$subject = "Contact Form Details";
// Set content-type header for sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= "From:" . $email1 . "\r\n";
$result = mail($to,$subject,$message,$headers);
if ($result) {
// $message = "Your Message was sent Successfully!";
echo '<script type="text/javascript">alert("Your Message was sent Successfully!");</script>';
echo '<script type="text/javascript">window.location.href = "../Reservation_Complete.html";</script>';
}
else{
// $message = "Sorry! Message was not sent, Try again Later.";
echo '<script type="text/javascript">alert("Sorry! Message was not sent, Try again Later.");</script>';
echo '<script type="text/javascript">window.location.href = "/"Event.htm"</script>';
}
}
?>
<?php
$to = "example@example.com";
/* This section is where the script reads your form fields. */
$name1= $_REQUEST['name1'];
$email1= $_REQUEST['email1'];
$phone1= $_REQUEST['phone1'];
$entree1= $_REQUEST['entree1'];
$name2= $_REQUEST['name2'];
$email2= $_REQUEST['email2'];
$phone2= $_REQUEST['phone2'];
$entree2= $_REQUEST['entree2'];
$subject = "Event Registration";
$header = "From: \"$name1\" <$email1>\r\n";
$header .= "Cc: $email1 \r\n";
$header .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$body = "<html>
<meta name=\"viewport\" content=\"width=device-width\" />
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
</head>
<body>
<table id='event' cellspacing='0'>
<tr>
<td align='center'>
<td align='center'><Event Title</td>
</tr>
<tr><td> </td></tr>
<tr>
<td align='center'>
<p>Date of event</p>
<p>Place of event</p>
<p>address</p>
<p>city, state, zip</p>
</td>
</tr>
<td align='center'>
Event details
</td>
</tr>
<tr>
<td align='center'>
<p>registration deadline</p>
<p>Prices</p>
</td>
</tr>
<tr>
<td colspan='2'>
<p>$name1</p>
Entree Selection $entree1</p>
<p>$phone1</p>
<p>$email1</p>
</td>
</tr>
<tr>
<td colspan='2'>
<p>$name2</p>
Entree Selection $entree2</p>
<p>$phone2</p>
<p>$email2</p>
</td>
</tr>
</table>
</html>";
(mail($to, $subject, $body, $header)) ;
echo "Looking forward to seeing you, " . $name1 . "! An email has been sent to event coordinator and a copy to you. Be sure to check your spam/junk folders.";
?>