Curiousguy
09-07-2003, 06:01 AM
How to create a time verification script like that .?
For Example: If There is three Classes, and "Class A" is only available between 10am - 1030am, and "Class B is only available between 1200pm - 1300pm... How do i using the Pull down menu to list out only the available class for the certain time, let say "Class A" is only available in the Pull down menu when the time is between 10am - 1030am?
is possible to create it in PHP or JaVa script??
where can i get this kind of sript?/?
PLs help ASAP .... thanks vry much
<?
$Connect = mysql_connect('localhost','root','');
mysql_select_db('mw');
$result=mysql_query("SELECT * FROM student where (username1='$username1')");
$number_of_array = mysql_num_rows($result);
echo '
<form name="main" method="POST" action="verify_attendance.php">
<table cellspacing="0" cellpadding="0" border="1" width=80% align=center>
<tr>
<td width=25% height=30 align=center>
Student ID
</td>
<td width=25% height=30 align=center>
Programme
</td>
<td width=25% height=30 align=center>
Subject
</td>
<td width=25% height=30 align=center>
Action
</td>
</tr>';
while ($number_of_array = mysql_fetch_array($result))
{
echo '
<tr>
<td align=center height=30>
'.$number_of_array['username1'].'
</td>
<td align=center height=30>
'.$number_of_array['programme'].'
<input type="hidden" name="programme" value="'.$number_of_array['programme'].'">
</td>
<td align=center height=30>
<select name="subject">
<option value="'.$number_of_array['subject1'].'">
'.$number_of_array['subject1'].'
</option>
<option value="'.$number_of_array['subject2'].'">
'.$number_of_array['subject2'].'
</option>
<option value="'.$number_of_array['subject3'].'">
'.$number_of_array['subject3'].'
</option>
<option value="'.$number_of_array['subject4'].'">
'.$number_of_array['subject4'].'
</option>
<option value="'.$number_of_array['subject5'].'">
'.$number_of_array['subject5'].'
</option>
</select>
</td>
<td align=center height=30>
<input type=submit name=Submit value="Mark Attendance" style=width:130>
</td>
</tr>';
}
echo '
</table>
</form>';
?>
For Example: If There is three Classes, and "Class A" is only available between 10am - 1030am, and "Class B is only available between 1200pm - 1300pm... How do i using the Pull down menu to list out only the available class for the certain time, let say "Class A" is only available in the Pull down menu when the time is between 10am - 1030am?
is possible to create it in PHP or JaVa script??
where can i get this kind of sript?/?
PLs help ASAP .... thanks vry much
<?
$Connect = mysql_connect('localhost','root','');
mysql_select_db('mw');
$result=mysql_query("SELECT * FROM student where (username1='$username1')");
$number_of_array = mysql_num_rows($result);
echo '
<form name="main" method="POST" action="verify_attendance.php">
<table cellspacing="0" cellpadding="0" border="1" width=80% align=center>
<tr>
<td width=25% height=30 align=center>
Student ID
</td>
<td width=25% height=30 align=center>
Programme
</td>
<td width=25% height=30 align=center>
Subject
</td>
<td width=25% height=30 align=center>
Action
</td>
</tr>';
while ($number_of_array = mysql_fetch_array($result))
{
echo '
<tr>
<td align=center height=30>
'.$number_of_array['username1'].'
</td>
<td align=center height=30>
'.$number_of_array['programme'].'
<input type="hidden" name="programme" value="'.$number_of_array['programme'].'">
</td>
<td align=center height=30>
<select name="subject">
<option value="'.$number_of_array['subject1'].'">
'.$number_of_array['subject1'].'
</option>
<option value="'.$number_of_array['subject2'].'">
'.$number_of_array['subject2'].'
</option>
<option value="'.$number_of_array['subject3'].'">
'.$number_of_array['subject3'].'
</option>
<option value="'.$number_of_array['subject4'].'">
'.$number_of_array['subject4'].'
</option>
<option value="'.$number_of_array['subject5'].'">
'.$number_of_array['subject5'].'
</option>
</select>
</td>
<td align=center height=30>
<input type=submit name=Submit value="Mark Attendance" style=width:130>
</td>
</tr>';
}
echo '
</table>
</form>';
?>