chat script small tip needed -- 2


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

Compétences : PHP, JavaScript, Architecture Logicielle, MySQL, HTML

En voir plus : yahoo look chat script, chat script, html code live chat script, pay per chat script, web cam chat script, free adult flash chat script, small business needed, free cam chat script, small image chat script php jquery, Write a Sqlplus script report.sql that shows \ select * from flight_assignments order by flno\ and \ select * from delayed_fli

Concernant l'employeur :
( 13 commentaires ) Curacao, Curacao

Nº du projet : #32215814

Décerné à:


sir message me i will help you i am php expert ... sir message me i will help you i am php expert ...

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% USD en 1 jour
(220 Commentaires)

10 freelances font une offre moyenne de 23 $ pour ce travail

(62 Commentaires)
(66 Commentaires)
(86 Commentaires)
(62 Commentaires)

Hello Sir, I have read your job description carefully start your project right now and able to lead your project to success asap. My Strong Experiences as follow: - PHP Framework Like Laravel & CodeIgniter (3+ years) Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(26 Commentaires)

PHP,PDO, Core-php, CakePHP, CodeIgniter, Laravel, Mysql, HTML, HTML5, CSS, JavaScript, jquery, AJax, And BUG FIXING etc. When we work for clients really feel happy because we like to work for clients to give them Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(9 Commentaires)

What is the $logged_user and $from variables? I need to know so I can help debug, have you tried to var_dump them both to see if they’re the same?

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(8 Commentaires)

Hello Client. I check your code. Now understand that you have some mistake. I can fix it in 10mins. if you select me,I will try in my best Thank you.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(2 Commentaires)

Hi, How are you? Here is your good partner. I have read your job description and am very interested in your task. I am very familiar with Php and Sql, So I can do very well in a few hours for you. please hire me, I wil Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(2 Commentaires)