Login Form MySQL Injection Protection

How to Protect Against MySQL Injection on User Login Form

The below mysql database query is to to protect your database against MySQL injection through user login forms. This preventive action make spammers stay away from running the database query on your database with out your knowledge

Query to Protect Against MySQL Injection via Login Form


$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);



Related Topic How to Prevent SQL Injection Attacks
How to Create registered User Login for Website in PHP & MySQL
SSH Secured Shell Configurations and Security Best Practices
Change MySQL Root Password
How to Restart mysql in linux

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback