Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged sql



1 2 Next »
This little function helps to fight common security issue with SQL injections, it can sanitize any global variable like $_POST, $_GET, $_SERVER etc and escape unsafe characters.
5 209 posted 11 years ago by naz
This is a method of my database class which let me sift the unsafe data inputs down.
3 177 posted 11 years ago by lajevardi
0 157 posted 11 years ago by jonniespratley
2 188 posted 11 years ago by jonniespratley
I am currently still working on this, and will make changes.
1 139 posted 11 years ago by jonniespratley
0 124 posted 11 years ago by eden159
2 125 posted 11 years ago by jtkendall
0 118 posted 12 years ago by stavelin
1 120 posted 12 years ago by wbowers
Pass a user-inputted variable to this function in order to prevent SQL injection. Example: mysql_query("INSERT INTO table VALUES('" . sql_sanitize($_POST["variable") . "')"); Instead of: mysql_query("INSERT INTO table VALUES('" . $_POST["var...
34 735 posted 12 years ago by engel
Created for my own purposes, thought I'd share though ;) copy paste at the top of your file and it does the magic :)
31 791 posted 12 years ago by peteypablonz
1 133 posted 13 years ago by drwitt
1 125 posted 13 years ago by nicolaspar
Building a SELECT with conditional WHERE parts, given from form-get parameters.
1 96 posted 13 years ago by assbach
1 2 Next »