jimw396 Posted May 4, 2010 Share Posted May 4, 2010 Hi All! PHP newbie here. I am trying very hard to work through this problem myself ( last 4 days) with no success. I have a form that I would like to be sent to individuals selected from a drop-down menu. Here is the PHP script; <?php $coordinator = $_REQUEST['coordinator'] ; $client = $_REQUEST['client'] ; $clientcontactname = $_REQUEST['clientcontactname'] ; $contactphonenumber = $_REQUEST['contactphonenumber'] ; $dateofclass = $_REQUEST['dateofclass'] ; $typeofclass = $_REQUEST['typeofclass'] ; $numberofdrivers = $_REQUEST['numberofdrivers'] ; $classlistreceived = $_REQUEST['classlistreceived'] ; $numberofinstructorsneeded = $_REQUEST['numberofinstructorsneeded'] ; $locationofclass = $_REQUEST['locationofclass'] ; $locationofdrivinglot = $_REQUEST['locationofdrivinglot'] ; $drivinglotcontactinformation = $_REQUEST['drivinglotcontactinformation'] ; $travelarrangementsneeded = $_REQUEST['travelarrangementsneeded'] ; $meetingroomarranged = $_REQUEST['meetingroomarranged'] ; $cateringarranged = $_REQUEST['cateringarranged'] ; $trafficconesneeded = $_REQUEST['trafficconesneeded'] ; $lcdprojector = $_REQUEST['lcdprojector'] ; $screen = $_REQUEST['screen'] ; $none = $_REQUEST['none'] ; $additionalnotes = $_REQUEST['additionalnotes'] ; $totalmessage = " Coordinator: $coordinator \n Client: $client \n Client Contact Name: $clientcontactname \n Contact Phone Number: $contactphonenumber \n Date of Class: $dateofclass \n Type of Class: $typeofclass \n Number of Drivers: $numberofdrivers \n Class List Received: $classlistreceived \n Number of Instructors Needed: $numberofinstructorsneeded \n Location of Class: $locationofclass \n Location of Driving Lot: $locationofdrivinglot \n Driving Lot Contact Information: $drivinglotcontactinformation \n Travel Arrangements Needed: $travelarrangementsneeded \n Meeting Room Arranged: $meetingroomarranged \n Catering Arranged: $cateringarranged \n Traffic Cones Needed: $trafficconesneeded \n LCD Projector: $lcdprojector \n Screen: $screen \n AV Equipment Needed: $none \n Additional Notes: $additionalnotes \n"; mail( "jim@xxxxxxxx.com", "Training Assignment", $totalmessage, "From: Tom@xxxxxxxx.com" ); header( "Location: http://www.xxxxxxxx.html" ); Any help on solving this would be GREATLY appreciated. My head is getting sore from banging it against the wall. Thanks, Jim ?> Quote Link to comment https://forums.phpfreaks.com/topic/200653-please-help-want-to-send-form-to-selected-email-receipients/ Share on other sites More sharing options...
nhojeinnor Posted May 4, 2010 Share Posted May 4, 2010 is ur smtp configure? is that the full codes? Quote Link to comment https://forums.phpfreaks.com/topic/200653-please-help-want-to-send-form-to-selected-email-receipients/#findComment-1052941 Share on other sites More sharing options...
jimw396 Posted May 4, 2010 Author Share Posted May 4, 2010 Yes, that is the full PHP code that I have. SMTP is fine. Thanks, Jim Quote Link to comment https://forums.phpfreaks.com/topic/200653-please-help-want-to-send-form-to-selected-email-receipients/#findComment-1052950 Share on other sites More sharing options...
Zane Posted May 4, 2010 Share Posted May 4, 2010 Try \r\n instead of \n Quote Link to comment https://forums.phpfreaks.com/topic/200653-please-help-want-to-send-form-to-selected-email-receipients/#findComment-1052965 Share on other sites More sharing options...
jimw396 Posted May 4, 2010 Author Share Posted May 4, 2010 Thanks Zanus. The different recipients are pulled from the $coordinator = $_REQUEST['coordinator'] ; which is a select drop -down field. I have tried using the following code- if(isset($_POST['coordinator']) && is_scalar($_POST['coordinator'])){ switch ($_POST['coordinator']) { case 'XXX': $mailto = 'jim@xxx.com'; break; case 'yyy': $mailto = 'john@xxx.com'; break; case 'zzz': $mailto = 'zzz@xxx.com'; break; case 'vvv': $mailto = 'dddd@xxx.com'; break; Where are you suggesting I try \r\n instead of \n? Thank you, Jim Quote Link to comment https://forums.phpfreaks.com/topic/200653-please-help-want-to-send-form-to-selected-email-receipients/#findComment-1052971 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.