";
//Connect to DB server
mysql_connect(myserver, myusername, mypasword);
//Connect to Database
mysql_select_db("mydatabase");
//Query the database for everything(*) that is on it.
$result = mysql_query("SELECT * FROM bookmark");
//mysql_num_rows() returns the number of bookmarks found.
$rows = mysql_num_rows($result);
echo "Number of bookmarks:";
//outputs the number of records (rows)
echo $rows;
echo "
";
//This allows you to access the query in a form of an array.
//The array index is the name of the field of the database.
while ($row = mysql_fetch_array($result))
{
echo "