Session tracking - finding a page number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Franky
    New Member
    • Mar 2007
    • 14

    Session tracking - finding a page number

    I am creating a training tutorial with a number of pages. when the users logs in or registers, they start a session, which is used on each page to ensure they are a valid user, etc.

    However, when the user select 'exit training', they are sent to the exit page where i need to be able to 'get' the page number of the previous page (i.e. the page they had reached when they selected 'exit training'). This will then be stored in a database table so they can continue from this point next time they log on.

    Can anyone help me with this? I have looked through a lot of things but cant find an answer. Thanks
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You have 2 options:
    1. store the page number in the $_SESSION variable of the user. In the exit page you store that last number in $_SESSION in the database.

    2. store the page number in the user's table each time a page is selected. Next time the user logs on you already know the last used number from the db.


    Ronald :cool:

    Comment

    Working...