hi
the below code i have used for attendance,when the user clicks submit...the person date,time,id will get stored in the database......
i want to know how to calculate the no of days he has worked......
ex:wen the admin checks on th 15th of the month...it should display how many he was present till 15th.....i want to calculate for each month........
<form name="fm3" method="post" action="date1.php">
<table>
<tr>
<td>splendor Id</td><td><input type="text" name="id3" size="20" value=<?php print "$_SESSION[id]";?> readonly></td>
</tr>
<tr>
<td>Day</td><td><input type="text" name="day" size="20" value=<?php
$tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
echo "".date("Y/m/d", $tomorrow);
?> readonly></td>
</tr>
<tr>
<td>Time</td><td><input type="text" name="tm1" size="20" value=<?php
$time_now=mktime(date('h'),date('i'),date('s'));
echo "".date('h:i:s A',$time_now);
?> readonly></td>
</tr>
<?php $_SESSION[time] = "$time_now";?>
<tr>
<td><input type="Submit" name="Submit" value="submit"></td>
</tr>
</form>