Re: Processing HTML in mail form
| From: | Joe Wollard | Date: | Wed, 21 Jun 2006 11:59:46 +0000 |
| Subject: | Re: Processing HTML in mail form | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238464@lists.php.net to get a copy of this message | ||
(sorry for the duplicate response Parathaban, forgot to reply to the list)
Look at example 4 from http://us3.php.net/function.mail
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";That should get you started. On Jun 20, 2006, at 9:41 PM, Prathaban Mookiah wrote:
Jonas: I am not sure if I understood your problem correct. But the way I understood it, you want the mail to be displayed as: F-namn: J L-namn: R Birth: 12 Address: 34 Zip: 56 City: 78 Phone: 90 Mail: jkj@jkl.se Desc: N Hair: hair Make: makeup Am I correct? If that is the case, I guess you should use '\n' instead of '<BR>'. Cheers, Prathap ---------- Original Message ----------- From: Jonas Rosling <webmaster@gamearena.se> To: PHP Lists <php-general@lists.php.net> Sent: Tue, 20 Jun 2006 23:56:47 +0200 Subject: [PHP] Processing HTML in mail formI've done the following code bellow for an e-mail form. But it handles the HTML tags as text. Is there anyway to get the HTML tags processed to form the mail? <?php------- End of Original Message ------- --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php@extract($_POST);$subject = 'Intresseanmalan';$forname = stripslashes($forname);$lastname = stripslashes($lastname);$date_of_birth = stripslashes($date_of_birth);$post_address = stripslashes($post_address);$zip_code = stripslashes($zip_code);$city = stripslashes($city);$phone = stripslashes($phone);$mail = stripslashes($mail);$description = stripslashes($description);$hairdresser = stripslashes($hairdresser);$makeup = stripslashes($makeup);$text = 'F-name: '.$forname.'<br>'. 'L-name: '.$lastname.'<br>'. 'Birth: '.$date_of_birth.'<br>'. 'Address: '.$post_address.'<br>'. 'Zip: '.$zip_code.'<br>'. 'City: '.$city.'<br>'. 'Phone: '.$phone.'<br>'. 'Mail: '.$mail.'<br>'. 'Desc: '.$description.'<br>'. 'Hair: '.$hairdresser.'<br>'. 'Make: '.$makeup;mail('monica@guldhair.se',$subject,$text,"From: $forname$lastname <$mail>"); ?> The mail looks like this when recived: F-namn: J<br>L-namn: R<br>Birth: 12<br>Address: 34<br>Zip: 56<br>City: 78<br>Phone: 90<br>Mail: jkj@jkl.se<br>Desc: N<br>Hair: hair<br>Make: makeup Thanks in advance // Jonas --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php