Hi
I need to set up something where by someone can post something and its done in three stages.
First page contains a form that requires some details. At the bottom of the page is a Next button that submits the form, this is submitted to the database and is redirected to the second page.
Second page contains a form and an upload page. At the bottom of the page is a Next button that submits the form to the database and redirects to the confirmation page, it also has a back button.
Third page is a confirmation of what has been inserted. It lists all the inputs and shows what files that have been uploaded. When the user click on complete it redirects and updates the database with it being complete from the hidden form field.
The back button is a hot topic on the net and I am not sure which is the best method to use. The problem.
When the "BROWSER" back button is clicked it comes up with an error and wants to resubmit the data, and when "my" back button is clicked it actually goes forward. I was thinking of holding the data that is submitted in a session so when the back button is clicked it is available. The files that are uploaded are normally large so I dont want to lose this and have the user to have to repost it.
Page one form:
<form action="post1.php" method="post">
TITLE <input type="text" name="title" /><br />
DESCRIPTION <textarea></textarea><br />
<input type="hidden" name="submitted" value="true" />
<INPUT TYPE="image" src="images/nextStep.png" width="174" height="33" alt="Step 1" />
</form>
Page two form:
<form action="post2.php" method="post" enctype='multipart/form-data'>
File to upload: <input type="file" name="upfile"><br />
Notes <textarea name="notes"></textarea><br />
<input type="hidden" name="submitted" value="true" />
<input type="image" onClick="history.go(-1);return true;" src="images/backStep.png" width="174" height="33" alt="Go back" />
<input type="image" src="images/nextStep.png" width="174" height="33" alt="Step 1" />
</form>
Page Three Confirmation:
<form action="post3.php" method="post">
Bla bla bla bla
<input type="hidden" name="complete" value="true" />
<input type="hidden" name="submitted" value="true" />
<input type="image" onClick="history.go(-1);return true;" src="images/backStep.png" width="174" height="33" alt="Go back" />
<input type="image" src="images/Complete.png" width="174" height="33" alt="Step 1" />
</form>
Any pointers appreciated. Thank you in advance.
I need to set up something where by someone can post something and its done in three stages.
First page contains a form that requires some details. At the bottom of the page is a Next button that submits the form, this is submitted to the database and is redirected to the second page.
Second page contains a form and an upload page. At the bottom of the page is a Next button that submits the form to the database and redirects to the confirmation page, it also has a back button.
Third page is a confirmation of what has been inserted. It lists all the inputs and shows what files that have been uploaded. When the user click on complete it redirects and updates the database with it being complete from the hidden form field.
The back button is a hot topic on the net and I am not sure which is the best method to use. The problem.
When the "BROWSER" back button is clicked it comes up with an error and wants to resubmit the data, and when "my" back button is clicked it actually goes forward. I was thinking of holding the data that is submitted in a session so when the back button is clicked it is available. The files that are uploaded are normally large so I dont want to lose this and have the user to have to repost it.
Page one form:
<form action="post1.php" method="post">
TITLE <input type="text" name="title" /><br />
DESCRIPTION <textarea></textarea><br />
<input type="hidden" name="submitted" value="true" />
<INPUT TYPE="image" src="images/nextStep.png" width="174" height="33" alt="Step 1" />
</form>
Page two form:
<form action="post2.php" method="post" enctype='multipart/form-data'>
File to upload: <input type="file" name="upfile"><br />
Notes <textarea name="notes"></textarea><br />
<input type="hidden" name="submitted" value="true" />
<input type="image" onClick="history.go(-1);return true;" src="images/backStep.png" width="174" height="33" alt="Go back" />
<input type="image" src="images/nextStep.png" width="174" height="33" alt="Step 1" />
</form>
Page Three Confirmation:
<form action="post3.php" method="post">
Bla bla bla bla
<input type="hidden" name="complete" value="true" />
<input type="hidden" name="submitted" value="true" />
<input type="image" onClick="history.go(-1);return true;" src="images/backStep.png" width="174" height="33" alt="Go back" />
<input type="image" src="images/Complete.png" width="174" height="33" alt="Step 1" />
</form>
Any pointers appreciated. Thank you in advance.