Jump to content

mail


postonoh

Recommended Posts

 

Sorry, I know how to make a basic php contact form.

<?php

/* Email Variables */

$emailSubject = ' Event';
$webMaster = '[email protected]';


/* Data Variables */

$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$company = $_POST['company'];
$address = $_POST['address'];
$city= $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$event = $_POST[Event];


$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: $emailsubject <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=">
<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>
<div align="center">Registration Complete!<br>
You will return to  in a few seconds !</div>
</center></blockquote>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

 

I need to know how make it loop thru check boxes and if the person register select yes send email to different locations.

Link to comment
https://forums.phpfreaks.com/topic/226346-mail/#findComment-1168342
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.