chriscrowe43
New Member
- Messages
- 23
- Reaction score
- 0
- Points
- 0
Hello I was wondering if there is anyone that could help me figure out this problem im having. I have been racking my brain for two days trying to figure this out.
Notice: Undefined offset: 1 in (site Root)/scripts/checkuserlog.php on line 76
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (site Root)/scripts/checkuserlog.php on line 80
Something appears wrong with your stored log in credentials. Log in again here please
Here's the code im dealing with.
lines 72-95
} else if (isset($_COOKIE['idCookie'])) {// If id cookie is set, but no session ID is set yet, we set it below and update stuff
$decryptedID = base64_decode($_COOKIE['idCookie']);
$id_array = explode("nm2c0c4y3dn3727553", $decryptedID);
$userID = $id_array[1];
$userPass = $_COOKIE['passCookie'];
// Get their user first name to set into session var
$sql_uname = mysql_query("SELECT username FROM myMembers WHERE id='$userID' AND password='$userPass' LIMIT 1");
$numRows = mysql_num_rows($sql_uname);
if ($numRows == 0) {
echo 'Something appears wrong with your stored log in credentials. <a href="login.php">Log in again here please</a>';
exit();
}
while($row = mysql_fetch_array($sql_uname)){
$username = $row["username"];
}
$_SESSION['id'] = $userID; // now add the value we need to the session variable
$_SESSION['idx'] = base64_encode("g4p3h9xfn8sq03hs2234$userID");
$_SESSION['username'] = $username;
$logOptions_id = $userID;
$logOptions_uname = $username;
$logOptions_uname = substr('' . $logOptions_uname . '', 0, 15);
im new to php and im totally at a loss. I want to impress that i dont want someone to do my work for me, i just really need to move beyond this. I have used previous versions of the (social website system) that i am currently working with and had no problems but this is a newer version with added coded and features that i need for my site. Please Help. And Thankyou so much ahead of time if you do!!
also if there is anything i might need to add to help me get replies please let me know, i see that my post is getting views but im afraid i need to add something to get a reply that i havnt.
Notice: Undefined offset: 1 in (site Root)/scripts/checkuserlog.php on line 76
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (site Root)/scripts/checkuserlog.php on line 80
Something appears wrong with your stored log in credentials. Log in again here please
Here's the code im dealing with.
lines 72-95
} else if (isset($_COOKIE['idCookie'])) {// If id cookie is set, but no session ID is set yet, we set it below and update stuff
$decryptedID = base64_decode($_COOKIE['idCookie']);
$id_array = explode("nm2c0c4y3dn3727553", $decryptedID);
$userID = $id_array[1];
$userPass = $_COOKIE['passCookie'];
// Get their user first name to set into session var
$sql_uname = mysql_query("SELECT username FROM myMembers WHERE id='$userID' AND password='$userPass' LIMIT 1");
$numRows = mysql_num_rows($sql_uname);
if ($numRows == 0) {
echo 'Something appears wrong with your stored log in credentials. <a href="login.php">Log in again here please</a>';
exit();
}
while($row = mysql_fetch_array($sql_uname)){
$username = $row["username"];
}
$_SESSION['id'] = $userID; // now add the value we need to the session variable
$_SESSION['idx'] = base64_encode("g4p3h9xfn8sq03hs2234$userID");
$_SESSION['username'] = $username;
$logOptions_id = $userID;
$logOptions_uname = $username;
$logOptions_uname = substr('' . $logOptions_uname . '', 0, 15);
im new to php and im totally at a loss. I want to impress that i dont want someone to do my work for me, i just really need to move beyond this. I have used previous versions of the (social website system) that i am currently working with and had no problems but this is a newer version with added coded and features that i need for my site. Please Help. And Thankyou so much ahead of time if you do!!
also if there is anything i might need to add to help me get replies please let me know, i see that my post is getting views but im afraid i need to add something to get a reply that i havnt.
Last edited: