<body>
<form method="post" action="index.php?module=membres&action=forum">
<table id='forum'>
<tr>
<td>Choix de forums:</td>
</tr>
<tr>
<td>Programmation</td>
<td><input type="radio" name="forum" id="prog" value="prog"></td>
</tr>
<tr>
<td>Reseau</td>
<td><input type="radio" name="forum" id="reseau" value="reseau"></td>
</tr>
<tr>
<td>Etude</td>
<td><input type="radio" name="forum" id="etude" value="etude"></td>
</tr>
</table>
<input type="submit" value="Charger le forum">
</form>
</body>
<?php
if(isset($_POST['submit'])) {
echo $id;
}
?>
I am trying to make a form with radio buttons. When you click on submit after choosing your radio button, the current page is supposed to be "updated" and calling a function in my $_POST['submit']
. The function is supposed to make appear a table with elements that it gets from the database. Now I am just trying to echo anything to see if my isset
post is working or not but apparently no. I also need a way to keep my radio button clicked after the submit