Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged sql
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I am currently still working on this, and will make changes.
1
1065
posted 16 years ago by jonniespratley
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
5947
posted 17 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
6552
posted 17 years ago by peteypablonz
Building a SELECT with conditional WHERE parts, given from form-get parameters.
1
850
posted 18 years ago by assbach