+ 1

PROCESSING INFORMATION TO SQL DATABASE USING PHP

I need someones help. I made a signup/login sheet using html, php, and sql. I signed up and checked my database right after and I saw that it had put my username and password into the database. Then I put $sql = "SELECT * FROM users WHERE username='$username' AND password='$password'; $result = $connection->query($sql); if($result->fetch_assoc()) { echo "You are logged in"; } else { echo "Username or password is incorrect"; } for some reason it keeps on putting "Username or password is incorrect." I think that there is a problem between it calling the username and password from the database but i don't know. Can someone please help me

15th Apr 2018, 11:37 PM
Someone Else
Someone Else - avatar
2 Antworten
0
you forgot to close your brackets after $password
16th Apr 2018, 7:58 AM
Dominique Abou Samah
Dominique Abou Samah - avatar
0
Please, stop using capital characters. Your Questions do not need them.
16th Apr 2018, 10:43 AM
sneeze
sneeze - avatar