Re: Processing HTML in mail form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(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@xxxxxx
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@xxxxxxxxxxxx>
To: PHP Lists <php-general@xxxxxxxxxxxxx>
Sent: Tue, 20 Jun 2006 23:56:47 +0200
Subject:  Processing HTML in mail form

I'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

    @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@xxxxxxxxxxx',$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@xxxxxx<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
------- End of Original Message -------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux