Still going at it trying to get this code to work...I am trying to pull an html code/page from the dbase based on a link selected, where have I gone offroad?
<html>
<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><BR>
<a href=\"?page=page_one\">Page One</a><BR>
<a href=\"?page=page_two\">Page Two</a></p>";
// list of possible pages comes from database
$cat_array=get_html_pages();
// you need to query the database for where $HTTP_GET_VARS['page'] = the row
db_connct();
mysql_select_db("book_sc");
$query = ("SELECT * FROM html_pages WHERE html_page_name = $HTTP_GET_VARS['page']");
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<BR>Number of html pages found:".$num_results."";
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "<BR><BR>HTML Code: ";
echo ( stripslashes($row["html_page_code"]));
echo "<BR><BR>";
}
if(!empty($GET)) { extract($GET); }
else { extract($HTTP_GET_VARS); }
if ($HTTP_GET_VARS['page']=="html_page_name")
{
echo ( stripslashes($row["html_page_code"]));
}
?>
</body>