I'm implanting a "Birthday's Today" function in my script. In the user's profile users can enter their birthday date (d-m-Y). Now I need to compare the day and month with the current day and month, and not the year.
This is my query as it is now:
Code: Select all
$birthday_query = mysql_query("SELECT userid, username, birthday FROM users WHERE birthday = '". date("d-m-Y") ."' AND status = '1' ORDER BY username ASC");Not that it's a problem to just add another field for year, but as I'm learning PHP I would like to know what the smartest way would be to do this.
Thanks in advance!