chat script small tip needed


i am writing a simple chat box but im stuck because i want to choose, depends on who's message do it comes, the field color should change.

for example if the text is sent by me, it should be blue, else it should be green.

ok i have :

mysql_query("SELECT * FROM task where chat_id ='$id'ORDER BY time_created ASC")or die(mysql_error());

and i have:

$chatbox .= '

<b class="alert-info"> . $message .'</b>';

i want each message depending who its coming from be green or blue.

i wrote this code: but cant fit it in:

if ($from == $logged_user)


$color_code = 'blue';

} else {

$color_code = 'green';


if you can help me fix it and with a low cost, let me know soon

Evner: PHP, MySQL, JavaScript, HTML, Software Arkitektur

Se mere: phpbb simple chat script, simple chat script facebook, simple facebook chat script php, need simple chat script, small image chat script php jquery, simple chat script html, simple chat script website, free simple php chat script, simple chat script php mysql jquery, simple chat script, simple webcam chat script, simple video chat script, Write a Sqlplus script report.sql that shows \ select * from flight_assignments order by flno\ and \ select * from delayed_fli, simple chat script in php mysql and ajax

Om arbejdsgiveren:
( 14 bedømmelser ) Curacao, Curacao

Projekt ID: #32208460

7 freelancere byder i gennemsnit $21 timen for dette job


Hi. I can help with this thing. Message me. Witg regards. %%%%%%%%%%%%%%%%%%%%%%%%%%%%5555555555555555

$20 USD på 1 dag
(45 bedømmelser)

Hello, I can help you to color the message based on who sent it, if message belongs to logged in user then it should be blue else it should be green. I can fix this for you. I have 8+ years of strong experience in php, Flere

$25 USD på 1 dag
(50 bedømmelser)

Hello, We went through your project brief and would love to help you execute your project. InterNative Labs, LLC is a woman-led company, located in ATL, GA. We have a team of professionals with 14+ years of experienc Flere

$30 USD på 1 dag
(8 bedømmelser)

Hi, How are you? I have read your job description and am very interested in your task. I am very familiar with Php, So I can do very well in a few hours for you. please hire me, I will do my best for you. Thanks for re Flere

$20 USD in 7 dage
(2 bedømmelser)

hello Etienne? I am a full stack expert and can fix your issues with 30$. Anyway money is no problem I can fix in a short time. Rovereto

$20 USD in 7 dage
(0 bedømmelser)

We got people with in PHP and MySQL, so we can do the work and solve it for you and if there is another suggestion just let us know

$25 USD in 7 dage
(0 bedømmelser)

Hi there :) I"m Nowshad Hossain, a full-stack web developer. I can help you to fix the message color issue, which is not working correctly. Though the code you've given looks good, but i think i should checkout the wh Flere

$10 USD på 1 dag
(0 bedømmelser)