Thread: SQL Injection
View Single Post
Old 06-26-2008, 04:33 AM   #8 (permalink)
Kalle
The Addict
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 247
Thanks: 6
Kalle is on a distinguished road
Default

I don't even bother to make all the *_real_escape_string() functions, I've designed an input filtering class that does it all for me and I just call it like:

PHP Code:
$tuxxedo->input->doSqlSafe('p', Array('input1''input2''...')); 
The 'p' tells my class it has to clean post, it can also combine with more like 'pg' (POST + GET or simply r for REQUEST (POST / GET / COOKIE)) and then it modifies the global scope variables so I don't need to care about them when calling the query after.

Using something like this made my coding much easier ;)
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote