Re: Re: Session won't pick up one variable (SOLVED)

From: Date: Sat, 31 Jan 2009 12:34:57 +0000
Subject: Re: Re: Session won't pick up one variable (SOLVED)
Groups: php.general 
Request: Send a blank email to php-general+get-287478@lists.php.net to get a copy of this message
thanks got it fixed: if (!empty($_POST['UserName']) && !empty($_POST['Password'])) { $UserName = $_POST['UserName']; $Password = $_POST['Password']; } *<---was missing a curly bracket..oi syntax* $msg = ''; if (!empty($UserName)) { $sql = "SELECT AdminID,UserName FROM admin WHERE UserName='$UserName' and Password='$Password'"; $result = mysql_query ($sql); $row = mysql_fetch_object ($result); If (mysql_num_rows($result) > 0) { $_SESSION['AdminLogin'] = true; $_SESSION['user'] = $UserName; $_SESSION['AdminID'] = $row->AdminID; header ('Location: Main.php'); exit;

« previous php.general (#287478) next »