lundi 30 juillet 2018

How can I Display rows in database with checkbox infront of Each row and store the data which are selected into the database?

Im creating a website where there is a operation of student batch making. There will be 4 students in the batch and there will be a Lecturer Head for each batch. I Want to show the student detail rows and select 4 students to a batch. Not Getting how to do the thing.

My code looks like this

<?php include ('connect.php');
$query = mysql_query("select * from student") or die(mysql_error());
    while ($row = mysql_fetch_array($query)) {
          $id = $row['rollno'];                                 
?>
<tr class="warning">
      <td><?php echo $row['rollno']; ?></td> 
      <td><?php echo $row['name']; ?></td>                                            
      <td><?php echo $row['email']; ?></td> 
      <td><input type="checkbox" name="checkroll" value="$row['rollno']" id="checkbox"></td>   




Aucun commentaire:

Enregistrer un commentaire