Hi.
I am making a news system and integrating it into vb. Now, when someone makes a comment the date is stamped in UNIX time format, how do i determine if it was posted say 12 or 24 hours ago?
this is what i am trying to do.. get the unix time stamp from database with $row[3]
Code:
$hrs_before_old = 24;
$today = mktime();
if($row[3] + $hrs_before_old * 60 * 60 > $today)
{
$posted = "<br>New!";
} else {
$posted = "";
}
but it doesn't work, I want it to say "New" if it was posted within 24 hours, any help?