Forum Moderators: coopster
any suggetions? ideas?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Web Pages</title>
<link href="styles/styles.css" rel="stylesheet" type="text/css">
<?php
// Require the database class
require_once('includes/DbConnector.php');// Create an object (instance) of the DbConnector
$connector = new DbConnector();
// Execute the query
$result = $connector->query('SELECT name,body FROM webpages WHERE ID = '.$HTTP_GET_VARS['id']);
// Get an array containing the resulting record
$row = $connector->fetchArray($result);
//Parse the db web page
$php_code = eval('?>' . $row['body'] . ' <?php ');
?>
</head>
<body>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="352" height="20" bgcolor="003366"><img src="images/Logo.gif"></td>
<td width="448" valign="bottom" bgcolor="003366"></td>
</tr>
<tr valign="bottom">
<td height="15" colspan="2" bgcolor="003366"><div align="left">
<?php
include ('nav.php');
?>
</div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><div align="left">
<br><p>
<span class="body">Web Pages </span><br>
</p>
</div></td>
</tr>
<tr valign="top">
<td height="600" colspan="2" bgcolor="#FFFFFF"><div align="left">
<span class="body">Page Name: <?php echo $row['name'];?>
<br>
<br>
</span>
//table that is populated by db
<table width="800" border="0" cellpadding="10" cellspacing="0">
<tr>
<td><div align="left" class="body"><?php print stripslashes $php_code;?>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>