Is this looking close...? It is not working though.
<html>
<head>
<title>Untitled Document</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?
require_once("sc_fns.php");
// links to the different info to display
echo"<p><a href=\"?page=splash\">splash</a> <a href=\"?page=page_one\">Page One</a> <a href=\"?page=page_two\">Page Two</a></p>";
// list of possible pages comes from database
$cat_array=get_html_pages();
if(!empty($GET)) { extract($GET); }
else { extract($HTTP_GET_VARS); }
if ($HTTP_GET_VARS['page']=="html_page_name")
{
echo "yes, yes, yes";
}
?>
<p>below the text data</p>
</body>
</html>
Here is what the get_html_pages() function looks like:
function get_html_pages()
{
// query database for a list of categories
$conn = db_connect();
$query = "select html_page_name from html_pages";
$result = @($query);
if (!$result)
return false;
$num_cats = @mysql_num_rows($result);
if ($num_cats ==0)
return false;
$result = db_result_to_array($result);
return $result;
}