Functions Php

// Header rows
print ("");
print ("


");
// DB connection information
$connection = mysql_connect("localhost","username","password");
$db = mysql_select_db("database", $connection);
// SQL Query
$sql = mysql_query("SELECT * FROM table");
$alternate = "2"; // number of alternating rows
while ($row = mysql_fetch_array($sql)) {
$name = $row["name"]; //name of field
$email = $row["email"];
if ($alternate == "1") {
$colour = "#000000";
$alternate = "2";
}
else {
$colour = "#464646";
$alternate = "1";
}
print ("
");
}
print ("
Name size=2>Email
sans-serif size=2>$name
$email
");
?>