Suoritettu

chat script small tip needed -- 2

Hi,

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

Taidot: PHP, JavaScript, Tietojärjestelmäarkkitehtuuri, MySQL, HTML

Näytä lisää: 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

Tietoa työnantajasta:
( 13 arvostelua ) Curacao, Curacao

Projektin tunnus: #32215814

Myönnetty käyttäjälle:

glennwilkins

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

$20 USD 1 päivässä
(220 Arvostelua)
6.5

10 freelanceria on tarjonnut keskimäärin $23 tähän työhön

(62 arvostelua)
6.2
(66 arvostelua)
6.2
(86 arvostelua)
5.8
(62 arvostelua)
5.2
manishuser

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) Lisää

$10 USD 1 päivässä
(26 arvostelua)
4.0
hyadesfreelancer

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 Lisää

$20 USD 1 päivässä
(9 arvostelua)
3.3
rutherfordandco

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?

$10 USD 1 päivässä
(8 arvostelua)
3.0
payoneerdenys

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.

$30 USD 1 päivässä
(2 arvostelua)
2.8
KolyaMaksimchuk

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 Lisää

$20 USD 1 päivässä
(2 arvostelua)
1.4