Halo I have here my table
sched_id sched_time sched_day emp_id
1 7:30-9:00 Monday 1
Primary key, varchar(20), varchar(20) and a foreign key respectively.
I want to show the text green when that specific data in the database is inserted and just a normal plain color when it is not yet inserted. Here is my work so far
<?php
$sel_admin = " SELECT * from ehr_schedule where emp_id=".$_SESSION['emp_id']." ";
$rs_admin = mysql_query($sel_admin);
if($row = mysql_fetch_array($rs_admin))
{
?>
<td><?php if ($row['sched_stime']=="7:30-9:00")
{ ?>
<span style="color:green">7:30-9:00</span> //I have already the specific requirement and data in my database, and this display nicely
<?php } ?>
7:30-9:00 //Although, I want this to be hidden when the requirement above is meeted
<?php } ?> </td>