PDA

View Full Version : Reply box



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>"
?> &nbsp;</td>
<td width="217">&nbsp;</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-->&nbsp;</td> ?>
<?php echo "<td></td>";
while($row = mysql_fetch_array( $result )){
echo "<td></td>";
echo $row['reply'];
}
echo "</table>"
?>
<td>&nbsp;</td>
</tr>
<tr>
<td height="117">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html> <!--DWLayoutEmptyCell-->&nbsp;</td>
<td width="217">&nbsp;</td>
</tr>
<tr>
<td height="213">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
Please help me!!

Dfraz
02-28-2008, 04:40 AM
Please

Dfraz
02-29-2008, 04:04 AM
Please help mee!!!

Inigoesdr
02-29-2008, 04:23 AM
What are you asking for?
BTW, you have duplicate code from your DOCTYPE to <!--DWLayoutTable-->.

PappaJohn
02-29-2008, 04:36 AM
And this is certainly not correct, not entirely sure what you're trying to accomplish here.


<td>&nbsp;</td>
</tr>
<tr>
<td height="117">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html> <!--DWLayoutEmptyCell-->&nbsp;</td>
<td width="217">&nbsp;</td>
</tr>
<tr>
<td height="213">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

rafiki
02-29-2008, 10:01 AM
why the double require_once(config.php);?

Dfraz
02-29-2008, 09:31 PM
I don't know.

Ok what I'm trying to do is make it where when you create a reply you can se your reply.
Right now it will show you the topic only without the reply you made.

So if you click a topic it will bring you to that topic and you will be able to see what's in the topic but it won't show your reply you made.