function displayTable($name, $phoneNumber, $age, $address)
{
    echo "<table><tbody>";
    displayRow("Name", $name);
    displayRow("Phone number", $phoneNumber);
    displayRow("Age", $age);
    displayRow("Address", $address);
    echo "</tbody></table>";
}
Example #2
0
function displayList()
{
    echo "<b><span class=usernameBlock>Ranks of the Faithful:</span> S.c.o.u.r.g.e. High Scores</b><br>";
    echo "(This page is still under construction. Feedback and feature wishes are appreciated.)<p>";
    $result = mysql_query("select * from score order by score desc");
    if (!$result) {
        header("HTTP/1.1 503 Can't execute select.");
        echo "Unable to select data.";
    } else {
        #$numRows = mysql_num_rows( $result );
        #echo "Data selected: $numRows rows.";
        $line = 1;
        while ($row = mysql_fetch_assoc($result)) {
            displayRow($row, $line);
            $line = $line + 1;
            echo "<br>";
        }
        mysql_free_result($result);
    }
}