Djotara Posted November 20, 2009 Share Posted November 20, 2009 Hey php freaks! I am still a php rookie and need your help. I am sure you will find it quite simple... I am making email form for my site and everything is perfect except when the mail is sent everything is in one line... Here is the code that should be edited: <?php $first_name = $_REQUEST['name_first']; $company = $_REQUEST['company']; $position = $_REQUEST['position']; $email = $_REQUEST['email']; $presentation_title = $_REQUEST['presentation_title']; $presentation = $_REQUEST['presentation']; $trip = $_REQUEST['trip']; $abstract = $_REQUEST['abstract']; $email_message = "Name: {$first_name} Faculty/Company: {$company} Position: {$position} E-mail: {$email} Presentation Title: {$presentation_title} The presentation will be {$presentation} Conference Trip: {$trip} Abstract:{$abstract} ".$field; mail('[email protected]', 'Form response', $email_message); ?> I know this is a piece of cake for you and thanks in advence! Cheers Djotara Link to comment https://forums.phpfreaks.com/topic/182291-solved-simple-contact-form/ Share on other sites More sharing options...
cags Posted November 20, 2009 Share Posted November 20, 2009 Since it's a plain text e-mail simply placing line breaks in the string should maintain them in the e-mail. $email_message = "Name: {$first_name} Faculty/Company: {$company} Position: {$position} E-mail: {$email} Presentation Title: {$presentation_title} The presentation will be {$presentation} Conference Trip: {$trip} Abstract:{$abstract} ".$field; Link to comment https://forums.phpfreaks.com/topic/182291-solved-simple-contact-form/#findComment-961930 Share on other sites More sharing options...
Djotara Posted November 20, 2009 Author Share Posted November 20, 2009 Thank that did just fine! Cheers Link to comment https://forums.phpfreaks.com/topic/182291-solved-simple-contact-form/#findComment-961933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.