PHP SQL Injection Prevention -


possible duplicate:
how prevent sql injection in php?

i working video streaming website college library.
using php , mysql.
have not used parameterized queries in project.
came know sql injections.
code done , have submit project in next 2 days,how can assure code not sql injection prone?
converting whole thing in parameterized interface can't ?
should avoid sql injections on website ?
plz !

the basic idea prevent sql injections (if not using prepared statements) escape data.

when inject expected integer value sql query, make sure it's integer, using intval().

when have decimal/numeric field in table, use floatval().

and when have string (char, varchar, text) field in table, use function provided api escape strings :


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -