I have this form :
I want to know if there is some way that when a user choose directeur
from niveau option field
to be redirected to the directeur's page
, and if he is choose some other value he will be redirected to this value's page.
I know the method using JavaScript
but I have to work only with PHP
, and to do all manipulation on that form in the same page where the page is.
I tried this :
if(isset($_POST['submit']))
{
if($_POST['niveau'] == 'directeur')
header('Location: directeur.php');
}
but this will redirect the user to the page without the $_POST
values.
I know that there I can send some values with the url and retreive them use $_GET
but I have to use only $_POST
.
so is there any other method to do that ?