I have a form with checkboxes.. and I need to send one at random as a variable.
Check more checkboxes and write one at random:
<form action="index.php" method="POST">
<input type="text" name="name" placeholder="Jméno vyvolávače" maxlength="32"><p>
<table>
<tr>
<input type="checkbox" onClick="toggle(this)" /> Vyber vše<br/>
<td>Ahri<input type="checkbox" name="champ" value="Ahri"></td>
<td>Aatrox<input type="checkbox" name="champ" value="Aatrox"></td>
<td>xx<input type="checkbox" name="champ" value="xx"></td>
<td>xx<input type="checkbox" name="champ" value="xx"></td>
</tr>
</table>
<input type="submit">
</form>
<?php
echo "Vyvolávači ".$name," pickni si ".$champ," na ".$line;
?>
So now I check Ahri and Aatrox.. and page submits one at random. How can I do this?
Aucun commentaire:
Enregistrer un commentaire