Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2009
    Thanked 0 Times in 0 Posts

    Login problem in php

    Hey, in my site user can login from any page as login control is available in every page. but the problem is when user login, after checking validation the user is redirected a certain page(like user profile page).

    so user losses track of current page. i want to control the website such that when user login from which page he/she login he will remain in the same page. i have a solution, but i think there is a better solution.

    please help me out as early as possible
    thanks in advanceeeeeee

  • #2
    Regular Coder funnymoney's Avatar
    Join Date
    Aug 2007
    Thanked 24 Times in 24 Posts
    best way to check for user information is to store it in server $_SESSIONS, and local $_COOKIES.

    every good browser has options to store cookies on user computer. when user visits your website you can check weather his browser has some cookies stored about it. if it does you can then use them to load content based upon what those cookies say

    $_SESSIONS are similar to cookies, except they are stored on server as on local computer.



    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts