I’ve got a piece of code here, but I’m not sure if it works 100%. So I thought I could ask you, Google didn’t gave me a straight answer so I hope you can. What I want to do is to show a DIV if the current date is before the date which has been given in the database. If the date is in the past then my DIV shouldn’t be shown.
PHP/SQL:
$sql = mysql_query("SELECT * FROM `tournaments` WHERE `deadline` > CURDATE()");
Is this the correct code for what I’m looking for?
Thanks for your time!
might want to add the equal as it would not display div’s with today as a deadline
otherwise that seems fine. you would build the logic: