Article name from article id in a module page – Joomla

<?php
$dVar=new JConfig();
mysql_connect($dVar->host,$dVar->user,$dVar->password);
mysql_select_db($dVar->db);
$articleResult = mysql_fetch_assoc(mysql_query(“SELECT * FROM “.$dVar->dbprefix.”content WHERE  id='”.$_REQUEST[‘id’].”‘ “)) or die(mysql_error());
echo $articleName = $articleResult[‘title’]
?>
Share

Leave a Reply

Your email address will not be published. Required fields are marked *