pls help me!! why this code is not executing?also send me the exact code to fetch a table from a database in a table format in a web page!!!!!

<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("niladri",$con);
$sql="SELECT * 
FROM `category` ";
$res==mysql_query($sql);
while($row==mysql_fetch_array($res));
{
 echo $row['cat_id'];
 echo $row['cat_name'];
}
?>

:'( :?: :icon_cry:

while($row==mysql_fetch_array($res));

Remove the ; at the end.
Its $row= and not $row==.

also send me the exact code to fetch a table from a database in a table format in a web page!!!!!

You need to figure that out yourself.. Check the example here.
http://www.w3schools.com/php/php_mysql_select.asp

Thanx nav33. I am really greateful to you!!!!!!!!!!:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.