The WHERE email == '$email' part of the query should be WHERE email = '$email' - SQL uses single equals sign as a comparison operator.
WHERE email == '$email'
WHERE email = '$email'
As for the results, try using mysqli_fetch_assoc.
Also, for passwords, don't use sha1. Use the password_hash and password_verify functions instead, as they're much more secure.
Thank you Martin for your reply, also thanks for the notice on using password_hash instead. I will try this now!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.