purple Posted November 11, 2013 Share Posted November 11, 2013 I am making attendance system with multiple radio button. I am new here. I hope that somebody can guide me the correct way to make multiple radio button in attendance system. Link to comment https://forums.phpfreaks.com/topic/283787-how-to-use-radio-button-in-attendance-system/ Share on other sites More sharing options...
KaiSheng Posted November 11, 2013 Share Posted November 11, 2013 <form action="something.php" method="post"> <input type="radio" name="preferred_color" value="Red" /> Red<br /> <input type="radio" name="preferred_color" value="Blue" /> Blue<br /> <input type="radio" name="preferred_color" value="Green" /> Green<br /> <input type="submit" value="Submit"> </form> example ^ u can edit on your own. ;o Link to comment https://forums.phpfreaks.com/topic/283787-how-to-use-radio-button-in-attendance-system/#findComment-1457816 Share on other sites More sharing options...
purple Posted November 11, 2013 Author Share Posted November 11, 2013 Thanx sir for your time.Actually, i want to do like this.This attendance system for school actually. When a teacher chose class, list of student name will appear in a table.Students and class are in a database. Besides students's name there will be two radio buttons to chose. Let look at attendance.php ____________________________________________________________________________________________________________________<html><table> <tr> <td><fieldset> <legend class="style58"></legend> <center><table width="750" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><tr> <td width="56"> </td> <td width="284"><label></label></td> <td width="410"> </td></tr> <tr> <form id="form1" name="form1" method="post" action="attendance display.php"> <tr> <td> </td> <td><span class="style57"> <label>Class</label> </span></td> <td><select name="class" id="class"> <option>Please Select</option> <option>Yellow</option> <option>Black </option> </select></td> <td> </td> <tr> <td> </td> <td align="right"> </td> <td> </td> </tr> </table><p align="center"> <center> <input type="submit" name="Submit" value="Enter" align="center"/> </form></center> </p></table></html>__________________________________________________________________________________________________________________________________ After teacher chose the class, name of student in the class will display in a table with radio buttons. Here the code that i make, but i know i do many mistake on my code. attendance display.php ______________________________________________________________________________________________________________________ <form action="index4process.php" method="post"> <table> <tr> <td> </td> <td align="right"><div align="left" class="style48"><span class="style8">Date</span></div></td> </tr> <td> </td> <td> </td> </table> <table border='1' align='center'> <tr> <th width="30"><font size="2">No</font></th> <th width="300"><font size="2">Student's Name</font></th> <th width="250"><font size="2">IC Number</font></th> <th width="250"><font size="2">Status</font></th> </tr> <?php mysql_connect("localhost", "root", "")or die(mysql_error()); mysql_select_db("attendance"); $a7=$_POST["class"]; $search=mysql_query("SELECT*from student where class='$a7' ")or die (mysql_error()); $nombor=1; while($data=mysql_fetch_array($search)) { $a=$data['nama']; $b=$data['no_ic']; ?> <tr> <td><?php echo $nombor ?></td> <td><?php echo $a ?></td> <td><?php echo $b ?></td> <td> <input type="radio" name="Present<?php echo $nombor; ?>" value="Present" >Hadir <input type="radio" name="Present<?php echo $nombor; ?>" value="Absent">Tidak Hadir </td> </tr> <?php $no++; } ?> </center> </table> <center> <label> <input type="submit" name="Submit" value="Sent" onSubmit="doSomething()" /> </label> </center> </form> ______________________________________________________________________________________________________________________ With hope.. Link to comment https://forums.phpfreaks.com/topic/283787-how-to-use-radio-button-in-attendance-system/#findComment-1457824 Share on other sites More sharing options...
KaiSheng Posted November 11, 2013 Share Posted November 11, 2013 According to what you said, "When a teacher chose class, list of student name will appear in a table." This is ajax. Wrong section. Please refer to here. http://forums.phpfreaks.com/forum/38-ajax-help/ Link to comment https://forums.phpfreaks.com/topic/283787-how-to-use-radio-button-in-attendance-system/#findComment-1457825 Share on other sites More sharing options...
purple Posted November 11, 2013 Author Share Posted November 11, 2013 Thank for this info.. Link to comment https://forums.phpfreaks.com/topic/283787-how-to-use-radio-button-in-attendance-system/#findComment-1457826 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.