Having trouble figuring something out, the site adminstrator I am building allows users to upload html code for site page output. Right now, I have it working if the pages are 'hardcoded' as links in the code, as shown below. But, how do I make this dynamic, as I obviously won't know the names of new pages that are uploaded:
<?
require_once("sc_fns.php");
echo '<html><body bgcolor="#FFFFFF" text="#000000">';
// links to the different info to display
echo '<p><a href="?page=splash"><img src="images/site/site_img1.gif" width="40" height="40" border="0"></a><BR>
<a href="?page=page_one">Page One</a><BR>
<a href="?page=page_two">Page Two</a></p>';
db_connct();
mysql_select_db("db_sc");
$query = ("SELECT * FROM html_pages WHERE html_page_name = '$page'");
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
//echo "<BR>Number of html pages found:".$num_results."<BR><BR>";
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
/ echo "<strong> HTML Page name: </strong>";
echo htmlspecialchars( stripslashes($row["html_page_name"]));
echo "<BR><BR>HTML Code: "; /
echo unhtmlentities($row["html_page_code"]);
echo "<BR><BR>"; }
?>