PHP Scripts

One form over two pages

One form appears and is replaced by another.
Finally the last form in the example, when submitted, goes to a results page.

<?PHP
session_start();
?>

<html>
<body>

<?php
if (isset($_POST["form1"])) {
?>

<form method=POST action="results.htm">

html - your 2nd form goes here

<input type=submit name="form2" value="continue"'>
</form>

<?php
} else {
?>

<form method=POST action="<?echo $PHP_SELF; ?>">

html - your 1st form goes here

<input type=submit name="form1" value="continue"'>
</form>

<?php
}
?>

</body>
</html>

 

 

Back