Jump to content


Photo

Form Processing


  • Please log in to reply
1 reply to this topic

#1 chris_davidsonuk

chris_davidsonuk
  • Members
  • Pip
  • Newbie
  • 7 posts

Posted 24 April 2006 - 04:07 PM

I have a form which is quite long. I have split it up into 3 parts but I only want to use only one file instead of posting the answers between 3 files. For example:

- The file is called mortgage.php
- The first part of the form would be mortgage.php?stage=1
- When all of stage 1 of the form has been completed they would go to mortgage.php?stage=2

What I can't figure out?

- When the user has submitted the form at stage 1 how would I change the url to mortgage.php?stage=2
- Would I still have to $_POST the results of each stage if all the information is taken within the same file?

Any guidance would be appricated!



---------------------------------------
[a href="http://www.studioeight.net" target="_blank"]www.studioeight.net[/a]

#2 Ferenc

Ferenc
  • Members
  • PipPipPip
  • Advanced Member
  • 94 posts

Posted 24 April 2006 - 04:51 PM

<form action="mortgage.php?stage=2" method="post" >


then use a switch in mortgage.php

switch($_GET['stage']){

default:
case '1':
// do stage 1 here
break;

case '2':
// do stage 2 here
break;
}
Everything you want to know is here.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users