I am making a parrent meeting webapplication but i have a problem. First you select a teacher to go to a table where you can see which appointments are still free. That table is filled with checkboxes where the parrents can select a time for when they want their appointment. All the occupied times have their checkboxes disabled.
This is the code i use for my checkboxes:
<table width="1100" border="1">
<tr>
<th style="text-align:center; padding:0 10px">Tijdstip</th>
<th style="text-align:center; padding:0 10px">Bezet?</b></th>
<th style="text-align:center; padding:0 10px">Commentaar</b></th>
</tr>
<form method = "post" action = "toevoegen.php">
<?php while ($record = mysqli_fetch_array($bezet)) { ?>
<tr>
<td><?php echo $record['start']; echo " "; echo $record['einde'];?></td>
<td>
<?php
$teller = $teller+1;
?>
<input type='checkbox' name='bezet' id='bezet' value="<?php $record['sequence'] ?>" onChange="this.form.submit(this)"
<?php if($record['bezet'] == 1 && $record['leerkracht_id'] == $_SESSION['lk']){ ?>
checked="checked"
disabled="disabled"
<?php } ?>
/>
</td>
<td><?php if($record['bezet'] == 1 && $record['leerkracht_id'] == $_SESSION['lk']){
echo "Bezet";
} ?></td>
</tr>
<?php } ?>
</form>
</table>
When u click on the checkbox you get redirected to the next page where you fill in your name and the name of your child. Now to get the application to work properly i would have to get the value of the last checked checkbox to dissalble the checkbox on the last page so no one else can take that time.
How would i be able to do this?
Anny help is appreciated and thanks in advance.
Aucun commentaire:
Enregistrer un commentaire