Welcome to the Battle
= 1)
{
echo "We're in luck. The query worked, and found $rows_found Confederates in the database:
";
// begin an unordered (bulletted) list
echo "\n";
// then fetch each of the row fields into an array called $row and
// loop thru the results to list each person on a bullet.
// the dots concatenate (glue together) pieces of data and text strings -
// like blank spaces (" ")
while ($row = @ mysql_fetch_array($result))
{
echo "- ".$row["rank_at_battle"].". ".$row["name_first"]." ".$row["name_last"]." (".$row["birth_year"]." - ".$row["death_year"].")
\n";
}
echo "
\n";
}
// ... otherwise show the 'sorry' message
else
echo "Sorry. The query worked, but found no Confederates in the database.
";
// we'll turn PHP off again, and finish the page's minimum XHTML
?>