Preventing Sql Injection in Joomla

Joomla JDatabase class provides the quote() method that will correctly quote and escape your sql input strings. This method will prevent sql injection attacks.

You can write your sql injection safe statements like this:


$sql = 'INSERT INTO table (field) VALUES ('.JDatabase::quote($param).')';

Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]