Here are the HTML + PHP files stripped of all the fancy stuff.
Hope this will do.
select.html
<HTML>
<title>Select Menu</title>
<BODY>
<HR></HR>
<form action="browse.php" method="post">
1. Select documents to display: <select name="tablename">
<option value="france">France</option>
<option value="usa">USA</option>
<option value="russia">Russia</option>
<option value="ukraine">Ukraine</option>
</select>
<P></P>2. And press the button to validate:
<input type="submit" value="Show documents">
</form>
</BODY>
</HTML>
browse.php
<HTML>
<title>Browse</title>
<BODY>
<?php
//connect
require_once('DB.php');
$db = DB::connect("mysql://headache@localhost/archives");
if (DB::iserror($db)) {
echo "Error: could not connect to database. Please try again later.";
die($db->getMessage());
}
$tablename = addslashes($tablename);
//issue the query
mysql_select_db("archives");
$sql = "SELECT * FROM $tablename";
$q = $db->query($sql);
if (DB::iserror($q)) {
die($q->getMessage());
}
//generate the table
while ($q->fetchInto($row)) {
?>
<?=$row[0] ?>
<?=$row[1] ?>
<?=$row[2] ?>
</HTML>
------------------------------------------------------------------------EOF