sheridanbman
02-09-2006, 04:35 AM
I have a script pulling data from mysql db. I have a date field that automatically inserts 0000-00-00 by default. So my code goes
if ($row['trained'] == "0000-00-00") {
$row['trained'] ="<img src='/track/images/icon_x.gif'>";
} else {
$row['trained'] ="<img src='/track/images/icon_check.gif'>";
}
If the date in the db is 0000-00-00 then it will display icon_x.gif if it has any other date it will display icon_check.gif.
I want to know how i can make it show the image like it is and display the alt text with the date on the icon_check.gif
Thanks,
Brian
if ($row['trained'] == "0000-00-00") {
$row['trained'] ="<img src='/track/images/icon_x.gif'>";
} else {
$row['trained'] ="<img src='/track/images/icon_check.gif'>";
}
If the date in the db is 0000-00-00 then it will display icon_x.gif if it has any other date it will display icon_check.gif.
I want to know how i can make it show the image like it is and display the alt text with the date on the icon_check.gif
Thanks,
Brian