Hello guys,

Hey, I m really new to drupal.

I have seen the input types being supported by drupal.

I have created a simple page.
In the body section, I have wrote some php code in " " tags.

This is a simple code which fetches data from database & displays it on the page created

---------------------------

$sql_getcats = "SELECT * FROM cl_category";
$ress= mysql_query($sql_getcats);
echo "<table>";
while($myrow=mysql_fetch_assoc($ress))
{
echo "<tr><td>";
echo $myrow['category_name'];
echo "</td></tr>";
}
echo "</table>";

--------------------------

In the input format I have selected 'php code' as my input format.

The problem is I still see the whole PHP code as HTML on the end user side. The PHP code has not been executed. It is just displayed there as it is.

Please suggest me some solution for this..

ThanX

Comments

bhavik_thegame’s picture

Hey,

I have got the solution.
I have installed the cck module.

I have disabled that & its working now.

But have to look on to the cck module now...

vijaythummar’s picture

Better use drupal wrapper function instead of MySQL function.... like db_query and db_fetch_assoc etc...

Thanks,
Vijay Thummar

bhavik_thegame’s picture

Ya,
Thanx, tat was fruitful