RSS

Category Archives: joomla

common errors and tips while coding in joomla

[joomla][tip] DB connection in non joomla pages

While using ajax based dropdowns, I required a db connection in php page (non joomla page). I did it as follows:

include(“../../../../configuration.php”); //adjust the path of configuration.php
$config = new JConfig();
$con = mysql_connect($config->host,$config->user,$config->password);
mysql_select_db($config->db,$con);

And Thats it 🙂

Same goes with almost every cms and framework.

 
Leave a comment

Posted by on March 22, 2012 in joomla

 

Tags: , , ,

 
%d bloggers like this: