# PHP eMail Formatting

**URL:** <https://forum.kirupa.com/t/php-email-formatting/244062>\
**Category:** Uncategorized\
**Created:** [November 14, 2007, 12:08am UTC](https://forum.kirupa.com/t/php-email-formatting/244062 "2007-11-14T00:08:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RndmIND](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RndmIND](https://forum.kirupa.com/u/RndmIND)\
**Post date:** [November 14, 2007, 12:08am UTC](https://forum.kirupa.com/t/php-email-formatting/244062/1 "2007-11-14T00:08:01Z")

</div>

So I’ve been trying to set this up so that it will format correctly in the receiver’s email. I’m more a designer than a developer. Here is my php:

```php

<?php

$subject = $_REQUEST["subject"];
$message = $_REQUEST["clr1"];
$message .= $_REQUEST["clr2"];
$message .= $_REQUEST["clr3"];
$message .= $_REQUEST["clr4"];
$sender = $_REQUEST["sender"];

$message = stripslashes($clr1);
$message .= stripslashes($clr2);
$message .= stripslashes($clr3); 
$message .= stripslashes($clr4);
$subject = stripslashes($subject);
$sender = stripslashes($sender);

$subject = "Color Choice : ". $subject;
$message = "Switch Color : ". $message;

// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "

" . $message;
$message= $full_message;

if(isset($clr1) and isset($clr2) and isset($subject) and isset($sender)){
    mail("mail@youremail.com", $subject, $message, "From: $sender");
}
?>

```

It comes out like this:

\*\*Switch Color : \*\*"clr1""clr2""clr3"“clr4”

But I’d like it to come out like this

\*\*Switch Color : \*\*“clr1”  
\*\*Switch Color : \*\*“clr2”  
\*\*Switch Color : \*\*“clr3”  
\*\*Switch Color : \*\*“clr4”

Thanks in advanced!
