<html>
<body>
<h1>A List of Users Who Have Signed Up For SPS</h1>
<?
$dbh = mysql_connect("localhost","root","")
or die("Couldn't connect to database.");
$db = mysql_select_db("test", $dbh)
or die("Couldn't select database.");
$sql = "SELECT username, email FROM oscarpool";
$result = mysql_query($sql, $dbh)
or die("Something is wrong with your SQL statement.");
while ($row = mysql_fetch_array($result)) {
$username = $row['username'];
$email = $row['email'];
echo '<a href="mailto:'.$email.'">'.$username.'</a><br />\n';
}
?>
</body>
</html>