I have a job, which asks me to display links on a web page, as long as their expiry date is valid. Basically I need a piece of code that…
1) Grabs the Expiry date from the column of the table.
2) It then compares it to today’s date.
3) Only display the link if it hasn’t reached its expiry date.
The way I did it was…
$today = date("d/m/y"); SELECT link FROM table WHERE exp_date <= $today
However this only compares the first values i.e. the days and it ignores everything else.
I’ll be grateful for anyone who helps.