Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation of web pages

Status
Not open for further replies.

jino

Programmer
Apr 1, 2004
41
0
0
CA
Hi There,

I have a web application that has four pages Introduction, Page1, Page2 and Page3. I want the user to navigate these pages in that order only. I want to restrict the user from typing the URL for Page1, Page2 or Page3 and accessing it from there. They should be able to access Page2 only if they have completed filling out the fields in the Page1 and so on. The user doesnt logon to my web application. Anyone can access the Intro page and navigate using the 'Next' button to Page1. Page1 has 'Next' and 'Previous' buttons to navigate the user.

How can I achieve this effect? Plese advise.

Regards

Jino
 
Check for a session variable that allows the user to move to a page.
Ex:
If the user finishes page1, you allow them to go to page2. You can set a session variable (allowpg2 = "true"). If that variable is set, than they can go to that page if they type in the URL, otherwise send them to the intro page.

Jim
 
Alternatively, you could use the HTTP_REFERER to find which page they came from.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Actually, re-reading the post, I think you were right with the session variable idea as the poster said:
They should be able to access Page2 only if they have completed filling out the fields in the Page1 and so on
Using the referrer will show where the user came from but not if the fields were correctly populated whereas you would only set the session variable if the fields were populated.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
You could also use the server variable but set validation on the pages if the fields are not filled out. Either way sounds good to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top