Multi page form with diffrent paths return options

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
smokiedabong
Forum Newbie
Posts: 2
Joined: Tue Jan 20, 2009 12:34 am

Multi page form with diffrent paths return options

Post by smokiedabong »

Hi , I don't have experience in PHP , I worked with graphics , 3d , vb ,lua and other stuff , I only did a couple of sites that used small PHP scripts . I'm statrting to work on a project that will have multi page forms with difrent paths with java script that will hide / show fields on each page and change background . Each page will have navigation tabs to jump to previos steps , lets say first step has page 234 , second step has page 567 , Is posible for an option in page 1 to change the path let's say jump to page 3 and then page 6 and then the step 1 tab on page 6 to return you to page 3 but if the path was 4 - 6 then the tab for step 1 on page 6 returns to page 4 ? Or I have to create separate multi page forms for all the variables ?
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Re: Multi page form with diffrent paths return options

Post by Bill H »

You can use something like this to make a page return wherever it came from, rather than a fixed page:

Code: Select all

if (isset($_GET['Quit']))                               // leaving, return to sender
{    $Go = "Location:" . $_SESSION['IxhereRetn'];
     unset($_SESSION['IxhereRetn']);
     header($Go);
     exit;
}
if (!isset($_SESSION['IxhereRetn']))
     $_SESSION['IxhereRetn'] = $_SERVER['HTTP_REFERER'];        // may have come from many places
 
The problen is that $_SERVER['HTTP_REFERER'] is iffy, not all servers provide it.
smokiedabong
Forum Newbie
Posts: 2
Joined: Tue Jan 20, 2009 12:34 am

Re: Multi page form with diffrent paths return options

Post by smokiedabong »

Thank you , I will try that .
Post Reply