Jump to content

HELP in session checking


sweeti

Recommended Posts

Hey everyone..

I cleared the earlier doubt i have a new doubt in the same system..

 

<code>

public function login($uname, $pass,$remember=false)

{

$result =$this->db->query("SELECT * FROM tbl_userauth");

$result->execute();

$resl=$result->fetchAll(PDO::FETCH_ASSOC);

if ($resl[0]['username'] !=$uname || $resl[0]['password']!=$pass)

{

return $this->error("User not Found");

}

else

{

    $userID=$resl[0]['userid'];

    $_SESSION['userid']=$userID;

 

      $uname=$resl[0]['username'];

      $_SESSION['uname']=$uname;

 

  if(isset($_SESSION['userid']))

 

    {

    header("location:dash.php");

    }

    else

    {

 

    header("location:login.php");

    }

 

</code>

 

 

No this is my system actually i wanted to do session checking..Rite now when i am logging in the system i am able to log in but the same URL if i copy and paste in another browser i dont have to log in i am already logged in that's not rite Na??

I mean in another browser i should b logging in and then able to access in rite????What am i doing wrong????

PLease guide me through..Thank you..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.