Dfraz
02-28-2008, 03:48 AM
Hey I don't know how to get this reply thing to work. It sopposed to select from the database and get that reply from that topic.
Here what I have.
<?php require_once("config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
color: #000000;
}
.style1 {
color: #66CCFF
}
-->
</style></head>
<body> <?php include ("menu.php"); ?>
<table width="1018" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="801" height="117" valign="top">
<?php require_once("config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
color: #000000;
}
.style1 {
color: #66CCFF
}
-->
</style>
<body>
<table width="1018" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="801" height="117" valign="top">
<?PHP $id = (isset($_GET['id'])) ? intval($_GET['id']) : 1; ?>
<?php $result = mysql_query("SELECT * FROM natopics WHERE id='$id'") or die(mysql_error()); // get the first (and hopefully only) entry from the result
echo "<td></td>";
while($row = mysql_fetch_array( $result )){
echo "<td></td>";
echo $row['message'];
}
echo "</table>"
?> </td>
<td width="217"> </td>
</tr>
<tr>
<td height="96" valign="top"> <?PHP $id = (isset($_GET['id'])) ? intval($_GET['id']) : 1; ?><?php $result = mysql_query("SELECT * FROM reply WHERE id='$id'") or die(mysql_error()); // get the first (and hopefully only) entry from the result<!--DWLayoutEmptyCell--> </td> ?>
<?php echo "<td></td>";
while($row = mysql_fetch_array( $result )){
echo "<td></td>";
echo $row['reply'];
}
echo "</table>"
?>
<td> </td>
</tr>
<tr>
<td height="117"> </td>
<td> </td>
</tr>
</table>
</body>
</html> <!--DWLayoutEmptyCell--> </td>
<td width="217"> </td>
</tr>
<tr>
<td height="213"> </td>
<td> </td>
</tr>
</table>
</body>
</html>
Please help me!!
Here what I have.
<?php require_once("config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
color: #000000;
}
.style1 {
color: #66CCFF
}
-->
</style></head>
<body> <?php include ("menu.php"); ?>
<table width="1018" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="801" height="117" valign="top">
<?php require_once("config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
color: #000000;
}
.style1 {
color: #66CCFF
}
-->
</style>
<body>
<table width="1018" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="801" height="117" valign="top">
<?PHP $id = (isset($_GET['id'])) ? intval($_GET['id']) : 1; ?>
<?php $result = mysql_query("SELECT * FROM natopics WHERE id='$id'") or die(mysql_error()); // get the first (and hopefully only) entry from the result
echo "<td></td>";
while($row = mysql_fetch_array( $result )){
echo "<td></td>";
echo $row['message'];
}
echo "</table>"
?> </td>
<td width="217"> </td>
</tr>
<tr>
<td height="96" valign="top"> <?PHP $id = (isset($_GET['id'])) ? intval($_GET['id']) : 1; ?><?php $result = mysql_query("SELECT * FROM reply WHERE id='$id'") or die(mysql_error()); // get the first (and hopefully only) entry from the result<!--DWLayoutEmptyCell--> </td> ?>
<?php echo "<td></td>";
while($row = mysql_fetch_array( $result )){
echo "<td></td>";
echo $row['reply'];
}
echo "</table>"
?>
<td> </td>
</tr>
<tr>
<td height="117"> </td>
<td> </td>
</tr>
</table>
</body>
</html> <!--DWLayoutEmptyCell--> </td>
<td width="217"> </td>
</tr>
<tr>
<td height="213"> </td>
<td> </td>
</tr>
</table>
</body>
</html>
Please help me!!