Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Am getting this error when i load my php page on the browser.
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'password= Torrie1892' at line 1 in C:\updated xampp\htdocs\e-eatery project\newlogin.php:36 Stack trace: #0 C:\updated xampp\htdocs\e-eatery project\newlogin.php(36): mysqli_query(Object(mysqli), 'SELECT username...') #1 {main} thrown in C:\updated xampp\htdocs\e-eatery project\newlogin.php on line 36


this is what i have tried:


What I have tried:
Posted
Updated 15-Mar-22 22:23pm
v8
Comments
Richard Deeming 16-Mar-22 4:46am    
Adding the text "this is what i have tried" without actually showing us what you have tried is pointless.

You have a syntax error in your SQL query. We can't see your query, so we can't tell you how to fix it.

But based on the error messages, you are storing passwords insecurely:
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]

That's especially unforgivable when PHP provides built-in functions to help you do it right:
PHP: password_hash[^]
PHP: password_verify[^]

1 solution

It seems there are some syntax error in your query. Check your query syntax and also check the ; at the end of your query because some SQL flavours like there to be a ; at the end of a query.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900