I have a database that has a list of films record that a member puts in. When they add the record a date is stored in the database. Now want i am trying to do is, display the films a member has added, but if a record is a week old to display a button
so e.g.
Code: Select all
<?php
if (TODAY(now()) - (TODAY($date)) <= 7){
echo "<td width="5%" bgcolor="$row_color" valign="middle" align="middle">
<a href='delete.php?advert_id=$advert_id&check=$member_id&type=ad '><img src='../classfied/cancel.gif' width="30" height="23" border="0"></a> </td>\n";}
?>I know that the if statement is wrong, but how would i go around so it understands the date now, and the date the film record was stored,.
Many thanks
jamie