Changes

Jump to: navigation, search

HTML/PHP Database Dump

163 bytes added, 02:40, 19 March 2014
no edit summary
<syntaxhighlight lang="php" enclose="div">
<?php
$con = mysqli_connect("computerlocalhost", "usergbs788db", "passwordpw", "databasegbs788db"); //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())
{
</tr>
';
$sql = "SELECT * FROM `tabletest2`;";
$result = mysqli_query($con, $sql); //This does what we have been doing in SQL: connecting to the database, and then putting in the query.
while ($row=mysqli_fetch_array($result))//This command just looks at a table row by row.
echo '
<tr>
<td>' . $row['col1accession'] . '</td> <td>' . $row['col2ordering'] . '</td> <td>' . $row['col3test'] . '</td> <td>' . $row['col4tat'] . '</td> <td>' . $row['result'] . '</td>
</tr>
'; /*This closes out the echo*/
';
?>
</syntaxhighlight>
 
 
{{This Is Your Brain On Informatics}}
 
[[Category:This Is Your Brain On Informatics]]
347
edits

Navigation menu