1$connection = mysql_connect('localhost', 'root', ''); //The Blank string is the password
2mysql_select_db('hrmwaitrose');
3
4$query = "SELECT * FROM employee"; //You don't need a ; like you do in SQL
5$result = mysql_query($query);
6
7echo "<table>"; // start a table tag in the HTML
8
9while($row = mysql_fetch_array($result)){ //Creates a loop to loop through results
10echo "<tr><td>" . $row['name'] . "</td><td>" . $row['age'] . "</td></tr>"; //$row['index'] the index here is a field name
11}
12
13echo "</table>"; //Close the table in HTML
14
15mysql_close(); //Make sure to close out the database connection