I want to display things from database in table in html. I found this example on somewhere on intertet and followed whole guide until I came there . It shows table and all but instead putting informations that are on database it just puts in "$data[1]" and "$data[0]". Thanks it advance
<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>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("employees");
$order = "SELECT * FROM data_employees ORDER BY name";
//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></tr>");
}
?>
</table>
</td>
</tr>
</table>
</body>
</html>