qozmiq Posted June 6, 2008 Share Posted June 6, 2008 I have a simple contact form using sendmail.php to process. I have six fields in the form, three text entry, and three radio boxes. Page http://kc-foto.com/form1.php. In the sendmail file, I have them listed as this: $email = $_REQUEST['email'] ; $name = $_REQUEST['name'] ; $golf = $_REQUEST['golf'] ; $three = $_REQUEST['360'] ; $realest = $_REQUEST['realest'] ; $message = $_REQUEST['message'] ; but in the actual mail function: mail( "[email protected]", "KC-Foto Feedback Form Results", $message, "From: $email" ); header( "Location: http://www.kc-foto.com/thankyou.html" ); Only $message is listed...I tried to add the other five, seperated by commas...which resulted in this" mail( "[email protected]", "KC-Foto Feedback Form Results", $message, $name, $golf, $three, $realest, "From: $email" ); header( "Location: http://www.kc-foto.com/thankyou.html" ); And when I did this, the message showed up blank. Now, I am a PHP noob, and was taking a stab in the dark at the coding. How should it look? ANY help or guidance would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/109001-sendmail-questions-on-noob-stab-in-the-dark-coding/ Share on other sites More sharing options...
Buddski Posted June 6, 2008 Share Posted June 6, 2008 Have a good read of this. www.php.net/function.mail mail('addess to send to','subject of the message','message you want to send', 'some headers'); My opinion would be to make a string of all the information you want in your message Also if you only want users to make an enquiry about ONE of the radio buttons give the 3 radio buttons just 1 name with differing values like.. Which Pizza? <input type="radio" name="pizza" value="Mexican" /> <input type="radio" name="pizza" value="Meaty One" /> <input type="radio" name="pizza" value="Vegitarian" /> then you can access which 'pizza' the user wants with $_POST['pizza'] Link to comment https://forums.phpfreaks.com/topic/109001-sendmail-questions-on-noob-stab-in-the-dark-coding/#findComment-559199 Share on other sites More sharing options...
qozmiq Posted June 6, 2008 Author Share Posted June 6, 2008 Excellent. Worked like a charm. However, the name, radio selections( i need them to be able to select multiple) and message all appear in one continuous line. Can this be formatted? Thanks for the link as well. Link to comment https://forums.phpfreaks.com/topic/109001-sendmail-questions-on-noob-stab-in-the-dark-coding/#findComment-559248 Share on other sites More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 add /n<br /> between each item Link to comment https://forums.phpfreaks.com/topic/109001-sendmail-questions-on-noob-stab-in-the-dark-coding/#findComment-559374 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.