This question already has an answer here:
I have a problem in userpie login and register script. So the script works good using lamp on linux mint! But when I go on windows there is more than 15 problem, one of them is
Notice: Trying to get property of non-object in C:\armadicehost\htdocs\models\funcs.user.php on line 164
Notice: Trying to get property of non-object in C:\armadicehost\htdocs\models\funcs.user.php on line 165
This is the code that line 165 and 164 have:
function isUserLoggedIn()
{
global $loggedInUser,$db,$db_table_prefix;
$sql = "SELECT user_id,
password
FROM ".$db_table_prefix."users
WHERE user_id = '".$db->sql_escape($loggedInUser->user_id)."'
AND password = '".$db->sql_escape($loggedInUser->hash_pw)."'
AND
active = 1
LIMIT 1";
}
if($loggedInUser == NULL)
And for login.php it says...
Notice: Undefined index: status in C:\armadicehost\htdocs\login.php on line 401
<?php
if(!empty($_POST))
{
?>
<?php
if(count($errors) > 0)
{
?>
<?php
} }
?>
I need to fix this please any idea about them?
</div>