Multi page form with diffrent paths return options
Moderator: General Moderators
-
smokiedabong
- Forum Newbie
- Posts: 2
- Joined: Tue Jan 20, 2009 12:34 am
Multi page form with diffrent paths return options
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 ?
- 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
You can use something like this to make a page return wherever it came from, rather than a fixed page:
The problen is that $_SERVER['HTTP_REFERER'] is iffy, not all servers provide it.
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
-
smokiedabong
- Forum Newbie
- Posts: 2
- Joined: Tue Jan 20, 2009 12:34 am
Re: Multi page form with diffrent paths return options
Thank you , I will try that .