DEV Community

Discussion on: PHP Login system

Collapse
 
marcusatlocalhost profile image
Marcus

With all due respect, this should not be on this website or published in any way anywhere, at least not without a big warning.
This code might reflect a simple login flow in php but it's more the prime example on how to open the door to sql injections and get hacked.
github.com/shamilkeheliya/web_logi...

There is no validation or sanitization of your $_POST fields.

I recommend to delete this post to not encourage anyone following your example.

Check out this tutorial, which is slightly more secure since it uses prepared statements. codeshack.io/secure-login-system-p...

Collapse
 
shamilkeheliya profile image
Shamil Keheliya

Thank You!!!!