I really need some help with PHP. I always get this error:
Notice: Undefined index: sUS_UserID in C:\xampp\htdocs\fazebook\inc\class.user.php on line 21
My "error" code:
$UserLoginQ = $DB->Query("SELECT * FROM `Users` WHERE `UserID` = '{$_COOKIE["sUS_UserID"]}'"); // LINE 21
if (intval($DB->Num($UserLoginQ)) > 0) {
$UserLoginA = $DB->Arr($UserLoginQ);
if ($_COOKIE["sUS_UserID"] == $UserLoginA["UserID"]) {
if ($_COOKIE["sUS_Security"] == md5($UserLoginA["LastIP"])) {
if ($_COOKIE["sUS_Password"] == md5($UserLoginA["Password"])) {
$this->ID = (int) $UserLoginA["UserID"];
$this->Name = $UserLoginA["Username"];
$this->LoggedIn = true;
}
}
}
}