Closed

chat script small tip needed

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

Skills: PHP, MySQL, JavaScript, HTML, Software Architecture

See more: 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

About the Employer:
( 14 reviews ) Curacao, Curacao

Project ID: #32208460

7 freelancers are bidding on average $21 for this job

niceDev

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

$20 USD in 1 day
(45 Reviews)
6.8
neerajmorya

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, More

$25 USD in 1 day
(50 Reviews)
6.5
InterNativeLabs

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 More

$30 USD in 1 day
(8 Reviews)
3.7
KolyaMaksimchuk

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 More

$20 USD in 7 days
(2 Reviews)
1.4
hassanfreelance5

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 days
(0 Reviews)
0.0
keonsas

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 days
(0 Reviews)
0.0
nhrDev

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 More

$10 USD in 1 day
(0 Reviews)
0.0