Skip to main content
Participant
June 13, 2013
Question

Passing a URL variable through login page into session variable

  • June 13, 2013
  • 6 replies
  • 3298 views

I have a dynamic list of events and event ids (page 1).  When a person selects an item from the list, they are taken to a sign-in page and the event name and id are passed via URL variables.  Once the login is confirmed, i want to continue using the event name and id on the pages that follow.  What is the best way to do this?  I can't seem to get anything to pass through the login page to the page that follows.

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

June 13, 2013

For many of us that are not mind readers on this forum it might help if you mention what server side scripting language you're using.

best,

Shocker

EntzlawAuthor
Participant
June 13, 2013

I am such a beginner at this, that I am not sure I can answer that.  My site was built in Dreamweaver with php and mySQL (MAMP for testing).

June 13, 2013

php is your server side language then. Please clarify the rest of your scenario with specifics. When someone clicks an event what is the parameters being passed? Ideally you'd have URL parameter keys consistent and have the value change depending on the event selected. So if someone clicks on event #1 in LA the url on login is something like this:

login.php?location=la&id=1

and if someone clicks on event #7 in New York the url on login is something like this:

login.php?location=ny&id=7

Is this how you currently have it setup or are the URL params different each time like this:

login.php?ny=7 or login.php?la=1

Please advise on how your URL parameters are being sent to login page. Also, do you want session set upon sucessful login or is it ok to set session variables before login and then use the values of those session after login is sucessfull.

best,

Shocker