Jump to content

attendance checking.. help!


etz

Recommended Posts

if ($num > 0) {

 

 

 

// Table header.

echo '<form action="attendanceregister2.php" method="post"><table border="1" align="left" cellspacing="1" cellpadding="1">

<tr><td align="center"><b>ID</b></td><td align="left"><b>Position</b></td><td align="left"><b>Name</b></td><td colspan="4" align="center"><font size="3" />Status</td></tr>

';

 

while ($row = mysql_fetch_array($result)) {

$bg = ($bg == '#CCFF99' ? '#CCFFff' : '#CCFF99');

echo '<tr bgcolor="' .$bg .'">

<td align="left">' . $row['id'] . '</td><td align="center">' . $row['Position'] . '</td><td align="left">' . $row['Name'] . '</td>

<td><input type="radio" name=' . $row['id'] . ' value="1" />Present</td>

<td><input type="radio" name=' . $row['id'] . '  value="0" />Absent </td>

<td><input type="radio" name=' . $row['id'] . '  value="n/,a" />n/a </td></tr>

 

';

}

 

echo '</table><br>';

 

mysql_free_result ($result);

 

} else {

echo '<p class="error">There are currently no registered users.</p>';

}

 

 

 

 

?>

 

 

 

 

....This is an online attendance checking script.For each name here i have three options w/c is present,absent, n/a (done by radio buttons).I'm having a problem on what script will i use to determine which of the three options has been selected for each name.I'm new in programming.please help me.Thaks!

 

Link to comment
https://forums.phpfreaks.com/topic/47665-attendance-checking-help/
Share on other sites

 

I am pretty new to php also and this is my first time offering help on the forums, so forgive me if I send you in the wrong direction, but shouldn't $row[] be accepting a number? I think you just have to figure out what  row the id is in (starting at 0 of course) and use that number in place of 'id'.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.