Hiya Vincent,
Sorry to bother you again. But I'm getting this error:
Cannot redeclare print_replies() in c:\phpweb\showquestion.php on line 85
The error is on the first line:
I've tried a couple of things but nothings changed. This is the function.
function print_replies($arg1,$arg2)
{
if($previous_id==$parent_)
{
$space.="-";
echo"<TR><TD bgcolor=#FFFFFF>$space<a href=\"showreply.php?this_id=$id&orig_id=$num\">$topic</TD><TD bgcolor=#FFFFFF>$author</TD><TD bgcolor=#FFFFFF>$date</TD></TR>";
$sql_reply = "SELECT * FROM $table_name WHERE parent_id=$previous_id";
$result_reply = mysql_query($sql_reply,$connection) or die("Couldn't execute query.");
if($result_reply)
{
while ($row = mysql_fetch_array($result_reply)) {
$id_reply = $row['id'];
$topic_reply = $row['topic'];
$author_reply = $row['author'];
$content_reply = $row['content'];
$date_reply = $row['date'];
$parent_reply = $row['parent_id'];
$replies_reply = $row['num_replies'];
$f_question_reply = $row['first_question'];
$previous_id=$id_reply;
print_replies($id_reply,$parent_reply);
} } }
else
{
$previous_id=$id;
$space="-";
}
}
Any ideas?
Thanks