Closed RosemaryRoss closed 9 years ago
You need to use SHA1(), not SHA!()
On Sat, May 23, 2015 at 6:38 PM, Rose notifications@github.com wrote:
I cannot figure out WHY the log in won't work. I swear I have the code exactly like the video. But I get an error.
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\aptana\AtomCMS\admin\login.php on line 14
Line 14 in the following code is the: if(mysqli_num_rows($r) == 1) {
if($_POST){
$q = "SELECT * FROM users WHERE email = '$_POST[email]' AND password = SHA!('$_POST[password]')"; $r = mysqli_query($dbc, $q);
if(mysqli_num_rows($r) == 1) {
$_SESSION['username'] = $_POST['email']; header('Location: index.php');
}
}
Help!!
— Reply to this email directly or view it on GitHub https://github.com/thedigicraft/Atom.CMS/issues/121.
Oh....I HATE when I do stupid things like that. I stared at that for hours and didn't see it. Thanks. Happy Memorial day.
I cannot figure out WHY the log in won't work. I swear I have the code exactly like the video. But I get an error.
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\aptana\AtomCMS\admin\login.php on line 14
Line 14 in the following code is the: if(mysqli_num_rows($r) == 1) {
if($_POST){
}
Help!!