₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,690 members, 8,441,794 topics. Date: Thursday, 09 July 2026 at 07:28 AM

Toggle theme

Is This Strong Enough To Prevent SQL Injection? - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersIs This Strong Enough To Prevent SQL Injection? (707 Views)

1 Reply (Go Down)

Is This Strong Enough To Prevent SQL Injection? by Raylight2(op): 5:56pm On Aug 18, 2015
$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
Re: Is This Strong Enough To Prevent SQL Injection? by IamGodzilla: 5:58pm On Aug 18, 2015
Raylight2:
$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
use mySQLI wink
Re: Is This Strong Enough To Prevent SQL Injection? by 0luwatope(m): 10:18am On Aug 19, 2015
Am a novice and i use cleanvalues... Am i safe?
Re: Is This Strong Enough To Prevent SQL Injection? by dwebdesign(m): 7:20pm On Aug 19, 2015
you should upgrade to using mysqlite same as MYSQLI,
but if you insist, stripslashes and encode base64 are secured methods enough for database.

for passwords, Also use A SALT VALUE, attach it to the submitted data before been sent to the database.
Re: Is This Strong Enough To Prevent SQL Injection? by micodon(m): 10:23pm On Aug 19, 2015
Raylight2:
$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
1. Use prepared statements with PDO. takes care of query filtering
2. Encrypt your passwords with BCRYPT. its probably the safest, popular encryption algo out their. with it, there's no need for using a salt.
Re: Is This Strong Enough To Prevent SQL Injection? by Raylight2(op): 7:44am On Aug 20, 2015
thank you all for your comments I'll apply them
1 Reply

SQL Injection: Complete TutorialHow To Secure Web Applications Against SQL INJECTIONWordpress Vulnerability: The Sql Injection234

Source Code Viewer ScriptHow To Submit A Press Release For Your Blog PostHow I Make $3000+ Today On My Adsense Account (this Is Exactly What I Did)