Hi all,
I am working on this php file, and have got it to show me members when I select January, it shows me all the birthdays from January but also extra dayes for e.g. it will add 12/01/1980 BUT also 01/12/1980 becuase it has a 1 and January is equal to 1 in my code, so how can I get it to know what is month?
[code=php]
//assign the bday variable.
$month = $_REQUEST[‘month’];
//birthday search
$info = mysql_query(“SELECT * FROM `tblmembers` WHERE `DateOfBirth` LIKE ‘%$month%'”);
echo ‘<table border=”1″ cellpadding=”3″ cellspacing=”1″>
<tr valign=”top”>
<td>First Name</td>
<td>Last Name</td>
<td>DateOfBirth</td>
<td>Last Login</td>
</tr>’;
if (mysql_num_rows($info) < 1) {
echo ‘<tr valign=”top”>
<td colspan=”4″>There are no members that match the query. Please go back and try again</td>
</tr>’;
}
else {
while ($qry = mysql_fetch_array($info)) {
//create the layout
?>
<link href=”cs_style.css” rel=”stylesheet” type=”text/css” />
<tr valign=”top”>
<td><?php echo $qry[‘FirstName’]; ?></td>
<td><?php echo $qry[‘LastName’]; ?></td>
<td><?php echo date(‘d/m/Y’, strtotime($qry[‘DateOfBirth’])); ?></td>
<td><?php echo($qry[‘loginDateTime’]?date(‘d/m/Y H:i:s’, strtotime($qry[‘loginDateTime’])):’N/A’) ?></td>
</tr>
<?php
}
}
echo ‘</table>’;
?>