The font color of the php chat room makes a simple PHP chat room. you can select the font color when entering the text, and then save the color and input content to mysql, however, the user input content can be output to the webpage, and the font color does not know how to output the content, solving the list ($ chtime, $ nick, $ words, $ usercolor) mysql_fetch_row ($ result); & nbsp; echo $ chtime; e php chat room font color problem
After a simple PHP chat room, you can select the font color when entering the text,
The color and input content are saved in mysql, but the user input content can be output to the webpage. the font color does not know how to output it.
List ($ chtime, $ nick, $ words, $ usercolor) = mysql_fetch_row ($ result );
Echo $ chtime; echo ""; echo $ words; echo"
";
Usercolor is the font color. echo $ usercolor is used. the output is invalid,
It should be because I have a problem with my thinking.
------ Solution --------------------
You have to assemble the font color into the correct html code or css.
For example
Red $ usercolor = "red ";
Echo ''. $ words .'
';