Changes

Jump to: navigation, search

HTML/PHP Database Dump

187 bytes removed, 18:21, 23 October 2013
no edit summary
<presyntaxhighlight lang="php">&lt;<?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 '
&lt;<html&gt;> &lt;<head&gt;> &lt;<title&gt;>Ooga&lt;</title&gt;> &lt;</head&gt;> &lt;<body&gt;> &lt;<h1&gt;>It is Tims Fault&lt;</h1&gt;> &lt;<table border="1"&gt;> &lt;<tr&gt;> &lt;<th&gt;>Accession&lt;</th&gt;> &lt;<th&gt;>Ordered By&lt;</th&gt;> &lt;<th&gt;>Test&lt;</th&gt;> &lt;<th&gt;>Turn Around Time&lt;</th&gt;> &lt;<th&gt;>Result&lt;</th&gt;> &lt;</tr&gt;>
';
$sql = "SELECT * FROM `test2`;";
{
echo '
&lt;<tr&gt;> &lt;<td&gt;>' . $row['accession'] . '&lt;</td&gt;> &lt;<td&gt;>' . $row['ordering'] . '&lt;</td&gt;> &lt;<td&gt;>' . $row['test'] . '&lt;</td&gt;> &lt;<td&gt;>' . $row['tat'] . '&lt;</td&gt;> &lt;<td&gt;>' . $row['result'] . '&lt;</td&gt;> &lt;</tr&gt; >
'; /*This closes out the echo*/
}
echo '
&lt;</table&gt;> &lt;</body&gt;>&lt;</html&gt;>
';
?&gt;></presyntaxhighlight>
1,845
edits

Navigation menu