为聊天系统添加颜色

I have a chat system on my site. i wanna be able to add colors for the users to chat. for some reason i am failling can anyone tell me what i am doing rung?

session_start();
if(isset($_SESSION['name'])){

This was the how it was organly till i changed it.

 $text = $_POST['text'];

The problam was when i did somthing like this in the chat <b>whatever</b> the out put would not come out bold just text like <b>whatever</b> so i tryid this $red = 'red' so when i tryd that nothing came out at all. no text no nothing. i am curintly trying something like this.

$textstart =  <font color=';
$red = red;
$green = green;
$blue = blue;
$textend =  '>   $_POST['text']   </font> ";
$textcolor = $textstart  $colorme  $textend ;


// Write to chat on post
$fp = fopen("log.html", 'a');
fwrite($fp, "<font color='green'><div class='msgln'>(".date("g:i A j-m").") <b>".$_SESSION['name']."</b>: </font>".stripslashes(htmlspecialchars($textcolor))."<br></div>");
fclose($fp);

I need the output of $textcolor in ".stripslashes(htmlspecialchars($textcolor))." to be like $textcolor

This is how the output will be $textstart red $textend