not sure how to incorporate that into my code. below is the code i am using:
<?php
include 'config.php';
include 'opendb.php';
// if no id is specified, list the available articles
if(!isset($_GET['id']))
{
$self = $_SERVER['PHP_SELF'];
$query = "SELECT id, title FROM report ORDER BY id";
$result = mysql_query($query) or die('Error : ' . mysql_error());
// create the article list
$content = '<ol>';
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
list($id, $title) = $row;
$content .= "<li><a href=\"$self?id=$id\">$title</a></li>\r\n";
}
$content .= '</ol>';
$title = 'Reports';
} else {
// get the article info from database
$query = "SELECT title, description, pricing, covershot, mainbody, contents, keywords FROM report WHERE id=".$_GET['id'];
$result = mysql_query($query) or die('Error : ' . mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$description = htmlspecialchars($description);
$pricing = htmlspecialchars($pricing);
$mainbody = htmlspecialchars($mainbody);
$contents = htmlspecialchars($contents);
$title = $row['title'];
$description = $row['description'];
$pricing = $row['pricing'];
$covershot = $row['covershot'];
$mainbody = $row['mainbody'];
$contents = $row['contents'];
$keywords = $row['keywords'];
}
include 'closedb.php';
?>
<html>
<head>
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $description; ?>">
<meta name="keywords" content="<?php echo $keywords; ?>">
<style type="text/css">
<!--
h1 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
}
h2 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
}
.main {
padding: 10px;
border: 1px solid #006699;
position: relative;
width: 580px;
margin-top: 20px;
margin-bottom: 20px;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include 'reportheader.htm'; ?>
<table border=0 cellspacing=0 cellpadding=0 width=934>
<!--DWLayoutTable-->
<tr valign=top>
<td width="23" height="25"></td>
<td width="535"> </td>
<td width="24"></td>
<td width="24"> </td>
<td width="1" rowspan=8 valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="28"> </td>
<td width="159"> </td>
<td width="140"> </td>
</tr>
<tr valign=top>
<td height="15"></td>
<td rowspan=2 valign="top"><h1 align="left"><?php echo $title; ?></h1></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr valign=top>
<td height="12"></td>
<td></td>
<td></td>
<td></td>
<td rowspan=3 valign="top"> <p><span class="bodybold"> <img src="<?php echo $covershot; ?>" border="0"></span></p>
<p><span class="body"></span></p></td>
<td></td>
</tr>
<tr valign=top>
<td height="18"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr valign=top>
<td height="127"></td>
<td colspan=2 rowspan=2 valign="top"><p><?php echo $mainbody; ?><br>
</p>
<p> </p></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign=top>
<td height="195"> </td>
<td> </td>
<td> </td>
<td rowspan=2 valign="top"> <h2 align="left"><?php echo $pricing; ?></h1></td>
<td> </td>
</tr>
<tr valign=top>
<td height="368"> </td>
<td colspan=2 valign="top"> <p><span class="body"><strong><font face="Geneva, Arial, Helvetica, sans-serif">Table</font></strong><font face="Geneva, Arial, Helvetica, sans-serif"> <strong>of
contents:</strong></font></span></p>
<p><strong></strong><span class="body"><?php echo $contents; ?></span></p>
<p><span class="body"> </span></p></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign=top>
<td height="40"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign=top>
<td height="45"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
</body>
</html>
thanks