347
edits
Changes
no edit summary
<presyntaxhighlight lang="php" enclose="div"><<?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 '
';
$sql = "SELECT * FROM `test2`;";
{
echo '
'; /*This closes out the echo*/
}
echo '
';
?>></presyntaxhighlight> {{This Is Your Brain On Informatics}} [[Category:This Is Your Brain On Informatics]]