I have a long application form that I want to have on one page but displayed in stages (parts). I want to write this in PHP and have it so when the user fills out a specific section and clicks submit, the data is stored and the next part is displayed on the same page. Here is what I have so far and it is not working. I think I have the basic concept down but I need help. Ans also is there some kind of IE bug fix code for PHP sessions 9this is something I hear about)?
here is the html of my page:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$formnum = $POST['formnum'] + 1;
if ($formnum == 2) {
// process data from form 1
$inputa = $POST['inputa'];
$inputb = $POST['inputb'];
$SESSION['inputa'] = $inputa;
$SESSION['inputb'] = $inputb;
} elseif ($formnum == 3) {
// process data from form 2
$inputc = $POST['inputc'];
$_SESSION['inputc'];
}
?>
<?php
if ($formnum == 1) {
?>
<form name="form1" method="post">
<p>
<input name="Name" type="text" id="Name">
</p>
<p>
<input name="Email" type="text" id="Email">
</p>
<p>
<input name="Phone" type="text" id="Phone">
</p>
<input type="button" name="Next" value="Next">
</form>
<?php
} elseif ($formnum == 2) {
?>
<form name="form1" method="post">
<p>
<textarea name="Comment" id="Comment"></textarea>
</p>
<input type="button" name="Next" value="Next">
</form>
<?php
} elseif ($formnum == 2) {
?>
<form name="form1" method="post" action="form.php">
<p>
<input name="1" type="radio" value="radiobutton">
</p>
<p>
<input name="2" type="radio" value="radiobutton">
</p>
<p>
<input name="3" type="radio" value="radiobutton">
<input type="button" name="Next" value="Next">
</form>
</p>
<?php
}
?>
</body>
</html>
What am I doing wrong? I know I am pretty close but I need some help. Thanks in advance.
-- K