<?php $SCRIPT_NAME=$_SERVER['SCRIPT_NAME'];?> <form action="<? echo $SCRIPT_NAME?>" method="POST"> <? echo ' <input type="submit" name="test" value="Начать тест!!!"><br>'; @$test=$_POST['test']; if (isSet($test)) { echo 'Вопрос1:<br><input type="submit" name="test1" value="a"> <br><input type="submit" name="test1" value="b">'; @$test1=$_POST['test1']; } elseif (isSet($test1)) { echo 'Вопрос2:<br><input type="submit" name="test2" value="a"> <br><input type="submit" name="test2" value="b"></form>'; @$test2=$_POST['test2']; } ?>
<form action="test.php" method="POST"> <input type="submit" name="test" value="Начать тест!!!"> </form>
<?php $SCRIPT_NAME=$_SERVER['SCRIPT_NAME'];?> <form action="<? echo $SCRIPT_NAME?>" method="POST"> <?php @$test=$_POST['test']; if (isSet($test)) { echo 'Вопрос1:<br><input type="submit" name="test1" value="a"> <br><input type="submit" name="test1" value="b">'; @$test1=$_POST['test1']; } elseif (isSet($test1)) { echo 'Вопрос2:<br><input type="submit" name="test2" value="a"> <br><input type="submit" name="test2" value="b"></form>'; @$test2=$_POST['test2']; } ?>