postonoh Posted February 1, 2011 Share Posted February 1, 2011 Looking for code form a registration page if a user select yes then send just the contact first and last name to one email address if no send all information to another email address. Link to comment https://forums.phpfreaks.com/topic/226346-mail/ Share on other sites More sharing options...
BlueSkyIS Posted February 1, 2011 Share Posted February 1, 2011 http://www.google.com/search?client=safari&rls=en&q=php+contact+form+tutorial&ie=UTF-8&oe=UTF-8 Link to comment https://forums.phpfreaks.com/topic/226346-mail/#findComment-1168318 Share on other sites More sharing options...
postonoh Posted February 1, 2011 Author Share Posted February 1, 2011 http://www.google.com/search?client=safari&rls=en&q=php+contact+form+tutorial&ie=UTF-8&oe=UTF-8 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.