Codice PHP:
switch($_GET['step'])
{
case 1:{
include 'step1.tpl';
/* # step1.tpl
<form action="page.php?step=2" method="post"><input type="submit" name="submit"></form> */
}break;
case 2:{
if ( isset($_POST['submit1']) )
{
if ( empty($_POST['name']) )
{
echo 'Inserisci un nome.';
}
header('Location: page.php?step=3');
}
include 'step2.tpl'; /* #step2.tpl
<form action="page.php?step=2" method="post"><input type="text" name="nome"><input type="submit" name="submit1"> */
}break;
Non mi effettua il controllo allo step=2, perchè?