- //This stops SQL Injection in POST vars
- foreach ($_POST as $key => $value)
- if(isset($_POST['{$key}']))
- $_POST[$key] = mysql_real_escape_string($value);
- //This stops SQL Injection in GET vars
- foreach ($_GET as $key => $value)
- if(isset($_GET['{$key}']))
- $_GET[$key] = mysql_real_escape_string($value);
Home »Unlabelled » STOP SQL INJECTION!
STOP SQL INJECTION!
=====================================================
//This stops SQL Injection in POST vars
foreach ($_POST as $key => $value)
if(isset($_POST['{$key}']))
$_POST[$key] = mysql_real_escape_string($value);
//This stops SQL Injection in GET vars
foreach ($_GET as $key => $value)
if(isset($_GET['{$key}']))
$_GET[$key] = mysql_real_escape_string($value);
This post was written by:
Adnan Anjum - who has written 1000+ posts on hackguide4u.
Adnan Anjum is a professional Geek. Follow him on Twitter or email him
Subscribe to:
Post Comments (Atom)
Share your views...
0 Respones to "STOP SQL INJECTION!"
Post a Comment