I have seen a site using php for its news page which indicates new articles added to the page by having an image (a gif image of the word "new") automatically displayed beside each new headline.I am guessing that it is comparing the date of a file and then is comparing it to the updated one, and if the file was updated, it will attach a gif image beside the headline. The code goes something like this:
$old_date = substr($DATE,0,10);
$new_date = date("Y-m-d");
and then it goes like this:
if($old_date == $new_date) {
echo "<a href=$MYBOARD_PHPtable=$TABLE&action=re&l=$UID>$SUBJECT </a>
<img src='new.GIF'>";
}
else {
echo "<a href=$MYBOARD_PHP?table=$TABLE&action=re&l=$UID>$SUBJECT </a>";
}
My problem is that I think the code is basing $old_date from the date of a file that updates via a database, hence the line
($old_date = substr($DATE,0,10);
My new code requires that I attach a "new" image automatically to a flat-file (text file). How should I do this?