Menu
When I start a session for a user, and once that user has logged in and session varibles (memberid, username, password) are set, how does PHP know one user session from another? Is there even a remote chance that userA’s session will collide, somehow, with userB’s? Trying to wrap my mind around this.
[code=php]
<?php
session_start();
if(empty($_SESSION['user_name']))
{
// load login form, display non-logged in page, or whatever
}
else {
// user is logged in, so we're good to go
}
[/code]
[code=php]
<?php
$db = new PDO('mysql:host=localhost;dbname=somedb', $uname, $password);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
?>
[/code]
I dont' see why you think they have to log in as they go from page to page.[/QUOTE]
0.1.9 — BETA 6.16