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!


Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default Query wont run???

    PHP Code:
    if ($_SESSION['username'] && $_SESSION['pass']) 
        {
          echo 
    "ONLINE"//Added to see if sessions were active
       
          
    $logge mysql_query("SELECT * FROM `users` WHERE `username` = '$_SESSION[username]' AND `password` = '$_SESSION[pass]'") or die(mysql_error());
          
    $logged mysql_fetch_array($logge);
       
          if(
    $logged[username])
               { 
                  echo 
    "<br>ONLINE2"
               } 
    // Added to see if query worked
        

    Now according to this, when logged in... the sessions are active (it comes up with online) however... the query wont run to creat $logged???

    Any suggestions?
    +Rep
    Sangreal / Romanity ~ Habbo UK & USA
    [OurHabbo.Net Owner]
    Lewis. (Formerly xRoyal15)

  2. #2
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by Sangreal View Post
    PHP Code:
    if ($_SESSION['username'] && $_SESSION['pass']) 
        {
          echo 
    "ONLINE"//Added to see if sessions were active
       
          
    $logge mysql_query("SELECT * FROM `users` WHERE `username` = '$_SESSION[username]' AND `password` = '$_SESSION[pass]'") or die(mysql_error());
          
    $logged mysql_fetch_array($logge);
       
          if(
    $logged[username])
               { 
                  echo 
    "<br>ONLINE2"
               } 
    // Added to see if query worked
        

    Now according to this, when logged in... the sessions are active (it comes up with online) however... the query wont run to creat $logged???

    Any suggestions?
    +Rep
    PHP Code:
    if ($_SESSION['username'] && $_SESSION['pass']) 
        {
          echo 
    "ONLINE"//Added to see if sessions were active
       
          
    $logge mysql_query("SELECT * FROM `users` WHERE `username` = '" $_SESSION["username"] . "' AND `password` = '" $_SESSION["pass"] . "'") or die(mysql_error());
          
    $logged mysql_fetch_array($logge);
       
          if(
    $logged[username])
               { 
                  echo 
    "<br>ONLINE2"
               } 
    // Added to see if query worked
        


Posting Permissions

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