<presyntaxhighlight lang="php"><<?php
$con = mysqli_connect("localhost", "gbs788db", "pw", "gbs788db"); //This references the database. We store it as a variable only so that we don't have to keep writing it out.
if(mysqli_connect_errno())
/*If we made it this far, it means that we successfully connected and made it to the next line. By putting echo, we are including html now!!*/
echo '
<<html>> <<head>> <<title>>Ooga<</title>> <</head>> <<body>> <<h1>>It is Tims Fault<</h1>> <<table border="1">> <<tr>> <<th>>Accession<</th>> <<th>>Ordered By<</th>> <<th>>Test<</th>> <<th>>Turn Around Time<</th>> <<th>>Result<</th>> <</tr>>
';
$sql = "SELECT * FROM `test2`;";
{
echo '
<<tr>> <<td>>' . $row['accession'] . '<</td>> <<td>>' . $row['ordering'] . '<</td>> <<td>>' . $row['test'] . '<</td>> <<td>>' . $row['tat'] . '<</td>> <<td>>' . $row['result'] . '<</td>> <</tr> >
'; /*This closes out the echo*/
}
echo '
<</table>> <</body>><</html>>
';
?>></presyntaxhighlight>