Page 1 of 1

Multi page form with diffrent paths return options

Posted: Tue Jan 20, 2009 12:49 am
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 ?

Re: Multi page form with diffrent paths return options

Posted: Tue Jan 20, 2009 8:58 am
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.

Re: Multi page form with diffrent paths return options

Posted: Tue Jan 20, 2009 12:02 pm
by smokiedabong
Thank you , I will try that .