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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux