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!

How do I change a hyperlink path based on user?

Status
Not open for further replies.

trout2

Programmer
Aug 8, 2003
2
0
0
US
Hi. I'd appreciate some help in determining how to solve this issue.

I'm designing an educational site for instructors to send their students to. I need to give each instructor a Home page unique to them and redirect the students to their instructor's Home page whenever they click on "Home" from within the site. The students should see only their instructor's Home page, and not those of any of the other instructors.

I have a registration system set up, where the students identify their instructor - and they'll go to the correct Home page when the first log in. Would I use a cookie to get them back to that Home page once they move off of it into the site? If so, do you know where I might find the appropriate script, or script that I can easily modify?

Or, is there a better way? Please keep in mind that I new to database programming and need a simple, reliable solution.

The site is being built in FrontPage and Access/ASP, which will be moved to a mySQL database on my server. It will accept java and CGI scripts. Thanks for your help! Trout
 
simple solution would be to manipulate the link in the href to the home page with a querystring stating the instructors name
so say the student registers or logs in etc. and they state Mr.SpongeBob as their instructor.

What you can do is set a session variable to the instructors name like
session("instructor") = "Mr.SongeBob"

Tehn depending on how you have the pages set up for your navigation you can jsut do this for all of them
<a href=&quot;index.asp?instructor=<%=session(&quot;instructor&quot;)%>&quot;>home</a>

then when the link is clicked you can run a short script determining what the Request.Querystring is that is being passed giving you your criteria to know what page to load.



_____________________________________________________________________
onpnt2.gif

[bdaycandle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top