I have a page where you enter your name and DOB and then you can search for people born on different days and it will show you different peoples' names'. But it includes the year when you search for them, which is okay but it would be better if there was a way so my code didn't select the year.
$result = mysqli_query($con,"SELECT * FROM dob WHERE dob='$dob'");
this piece works to search but i don't want it to include year... So i changed it to this:
$result = mysqli_query($con,"SELECT * FROM dob WHERE MONTH(Date) = '$month' AND DAY(Date) = '$day'");
When i use the page that doesn't include the year (the second piece of code) i get this error:
"Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/k11adamb/public_html/php/search.php on line 121"
Can anyone tell me why it does not work or let me know how i could select the date without the year? Thanks.