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

Multi page form with diffrent paths return options

Postby smokiedabong » Tue Jan 20, 2009 1:49 am

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 ?
smokiedabong
Forum Newbie
 
Posts: 2
Joined: Tue Jan 20, 2009 1:34 am

Re: Multi page form with diffrent paths return options

Postby Bill H » Tue Jan 20, 2009 9:58 am

You can use something like this to make a page return wherever it came from, rather than a fixed page:
Syntax: [ Download ] [ Hide ]
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.
User avatar
Bill H
DevNet Resident
 
Posts: 1051
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA

Re: Multi page form with diffrent paths return options

Postby smokiedabong » Tue Jan 20, 2009 1:02 pm

Thank you , I will try that .
smokiedabong
Forum Newbie
 
Posts: 2
Joined: Tue Jan 20, 2009 1:34 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests