I am using the following code to fetch data from a database table:
<!DOCTYPE HTML>
<html>
<head>
<title>Search data</title>
</head>
<body>
<table>
<tr>
<td align="center">EMPLOYEES DATA</td>
</tr>
<tr>
<td>
<table border="1">
<tr>
<td>NAME</td>
<td>EMPLOYEES<br>NUMBER</td>
<td>ADDRESS</td>
</tr>
<?php
//the example of searching data with the sequence based on the field name
//search.php
mysql_connect("localhost","root","");//database connection
mysql_select_db("db_psu_online");
$order = "SELECT * FROM tb_income_statement_igp_fields";
//order to search data
//declare in the order variable
$result = mysql_query($order);
//order executes the result is saved
//in the variable of $result
while($data = mysql_fetch_row($result)){
echo("<tr><td>$data[1]</td><td>$data[0]</td><td>$data[2]</td></tr>");
}
?>
</table>
</td>
</tr>
</table>
</body>
</html>
The output of the code above is this:

I don’t know why the characters: "); } ?> are being printed.
Are you saving the file with the extension
.php? Is PHP installed and enabled on your server?The answer to at least one of these is “no”, because what you are seeing is the raw PHP output in the HTML – if you use the browser’s View Source, you’d see that clearly.