Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Jan 2007
    Location
    Canada eh?
    Posts
    766
    Tokens
    75

    Default

    Heres what you want to do:

    PHP Code:
    <?php
    session_start
    ();
    $user $_POST['username']; //This would be like from the login form
    $result mysql_query("SELECT * FROM usertable WHERE username = $user");
    $row mysql_fetch_array($result);
    $_SESSION['yoursite_username'] = $row['username']; //This sets their username
    $_SESSION['yoursite_password'] = $row['password']; //Same for the pass (encrypt it)
    ?>
    And then just do a check and say:

    PHP Code:
    <?php
    session_start
    ();
    $result mysql_query("SELECT * FROM usertable WHERE username = $user");
    $row mysql_fetch_array($result);
    if(
    $_SESSION['yoursite_username'] == $row['username']&&$_SESSION['password'] == $row['password']){
    $_SESSION['yoursite_username'] = $row['username']; //This sets their username
    $_SESSION['yoursite_password'] = $row['password']; //Same for the pass (encrypt it)
    }
    ?>

  2. #12
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default

    Cheers everyonez

Page 2 of 2 FirstFirst 12

Posting Permissions

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