Motifaithed 3 Newbie Poster

Hi Guys,

I'm comparing to tables, one profiletable and one presenttable, I want to compare two dates upon entering, the date from a textbox, I want to validate all data from profiletable and on the presenttable, if left on the profiletable without the tag of the date that I input, it will show as absent, however I cant make it work, everything on the profiletable is appearing, here is my code

$q = mysql_query("SELECT profiletable.firstName, profiletable.lastName, presenttable.presentDate
		 FROM profiletable
         LEFT JOIN presenttable
         ON profiletable.presentDate=presenttable.presentDate
         ORDER BY presentTable.firstName");
    while( $row = mysql_fetch_array($q))
    {
    ?>
   <tr>
    <td><?php echo $row['uniqueID']; ?></td>
	<td><?php echo $row['firstName']; ?></a></td>
    <td><?php echo $row['lastName']; ?></td>
	<td><?php echo $row['presentDate']; ?></td>
   </tr> 
   
    <?php  mysql_close($con); ?>