Hi
With the following script

<html>
<body>
<?php
$server = "localhost";
$username= "root";
$password ="mysql";
$connect_mysql=mysql_connect($server,$username,$password);
if($connect_mysql)
{
echo "Connection Established";
$mysql_db=mysql_select_db("mysql");
if($mysql_db)
echo "<Br><Br>Connected to database <BR><BR>";
echo  "<Table>";
echo "<TR><TH>Employee_ID</TH><TH>Employee_Name</TH></TR>";
echo "<DBQUERY q>select  emp_id,emp_name from employee";
echo "<DBROW><TR><TD><? q.emp_id></TD><TD><? q.emp_name></TD></TR> ";
 
echo "</DBQUERY>";
echo "</TR>";
echo "</Table>";
}
?>
</body>
</html>

The output is unexpectedly getten as the following
Connection Established

Connected to database

Employee_ID Employee_Name
select emp_id,emp_name from employee
Please can anyone help me thankfully.

who told you this way to write query.....
Look into this to learn how to write sql queries in PHP.....Click Here

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.