Chikwado Posted January 8 Share Posted January 8 (edited) Good day admin Please a newbie is struggling here and needed a help. <?php $db = new SQLite3('test.db'); $userlog = "Chikwado"; $userpass = "wizard&33"; $sql = "SELECT * FROM user WHERE username = '$userlog' AND password = '$userpass' LIMIT = 1"; $result = $db->query($sql); while ($row = $result->fetchArray(SQLITE3_ASSOC)){ if($row['username'] === $userlog && $row['password'] === $userpass) { echo "Login was successfully."; }else{ echo "Invalid credentials."; } } unset($db); ?> To run the code above, I get http code failure. I need help and advice. Your advice is greatly appreciated. Edited January 8 by Chikwado Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now