Code: Select all
<?php
$con = mysql_connect("localhost","removed","removed");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("primary_petition", $con);
$result = mysql_query("SELECT * FROM signatures ORDER BY id ASC");
echo " <br />
<br />
<br /><center><table border='1'>
<tr>
<th>Signature Number</th>
<th>Name Provided</th>
</tr></center>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
<HEAD>
<TITLE> Petition Names </TITLE>
<BODY>
<BR>
<BR>
<br>
<a href=http://writtenms.info>Click here for the main page.</a>
</BODY>
</HTML>