Results 1 to 2 of 2

Thread: login

  1. #1
    Join Date
    Apr 2008

    Unanswered: login

    the login feature, when someone logs in to your website and you verify that they entered in all the right information and all of that, what necessarily keeps them logged in and how can you make it so that every piece of information that they put in has their username on it?

  2. #2
    Join Date
    Apr 2008
    West Sussex
    Its called sessions or cookies. I prefer sessions.

    PHP Code:
    $_SESSION['username'] = "$_POST[username]"
    for instance.

    But the best way in my opinion is to fetch all the details from the databse, then do $_SESSION[id]

    then have say

    PHP Code:
    $var mysql_query("SELECT * FROM `users` WHERE `id` = '$_SESSION[id]'; 
    Therefore if they change their details it always follows their id.

Posting Permissions

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