Joomla Security

We will protect your Joomla website from malicious attack. Read more...

Site Admin

We will doing regular admin for your website, including regular backup, joomla update, joomla extensions install/update, security and optimization. Read more...

PSD to Joomla

You doing the design, I convert it into Joomla site. Read more...
Home Joomla Customization Programming in Joomla Way
Programming in Joomla Way

Retrieve HTTP variables

Joomla provided a mosGetParam function to easily retrieve the value of a parameter passed from a previous page:

mosGetParam($_REQUEST, 'id', 0));

if magic_quotes_gpc is off then mosGetParam will automatically escape single quotes, double quotes, backslashes and nulls by adding a backslash character (unless the _MOS_ALLOWRAW option is used).

Note that if intend to store the data returned by a mosGetParam call in a database field then will need to perform additional database-specific escaping: datagase->getEscaped.

Retrieve data from database

global $database; $sql = "SELECT * FROM #__categories"; $database->setQuery($sql); $rows = $database->loadObjectList(); foreach ($rows as $row) { echo "$row->title; $row->description\n"; }
 
Joomla template made by HeJian