ok i have a member table and inside that table i have a field called birthday and that field is setup like this :
birthday date NOT NULL default '0000-00-00',
Fields i want to use for listing the Birthdays is fname and lname
A few questions.
1) how do i do the query so that it looks thru all members birthday fields and finds birthdays listed this month based on the current month, and list fname and lname and of course month and day and NOT THE YEAR. But my problem using the code below, shows me this:
Happy Birthday To following members
John Doe 1956-01-07
Mary Jane 1967-01-23
and i want it to show it like this.
Happy Birthday To following members
John doe January 07
Mary Jane January 23
Don't even want to use the year for right now. After I get help figuring this out , i would like to have it calculate the persons birthday so it would show that John doe is 46 years old based on year he was born but for now just working on the one issue.
order by first day of month downward.
Now if there isnt a birthday i want it to show "No birthdays this month".
2) How do i make the form so that it inputs the right format into the birthday field ?
3) Now i was going to use but like i said it's not how i need it:
<table border="0" cellpadding="0" cellspacing="0" width="400">
<tr><td>Happy Birthday To following members</td></tr>
<?
$query="SELECT fname, lname, birthday FROM members WHERE month(now())=month(birthday)";
$result = mysql_query($query) or die("Query failed");
while ($myrow = mysql_fetch_array($result)) {
?>
<tr><td><? echo $myrow["fname"]?> <? echo $myrow["lname"]?> <? echo $myrow["birthday"]?> </td></tr>
<?
}
?> </table>