March 07, 2011
PHP - Mysql sanitizer function
Author:
tec
at
3/07/2011 01:33:00 am
Labels:
mysql clean function,
mysql sanitizer function,
php mysq function,
projects
This is my sanitizer function that I use on every variable before placing them in a query.Hope you like it.
Subscribe to:
Post Comments (Atom)
does it secures script
ReplyDeleteYes it does. :)
ReplyDeletecan u help me
ReplyDeletewhile i used
php_value auto_prepend_file filename.php
in .htaccess
my site showed an error :
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'filename.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
where's the error
Mahesh, you must use absolute path of filename.php for this. Do it like this:
ReplyDeletephp_value auto_prepend_file /home///filename.php
Also in case .htaccess directive is ignored, you can edit httpd.conf file to do the same or manually prepend the file in each and every php file.
how to use this sanitize function and where please ellaborate
ReplyDelete