Lid |
|
hey mensne.
Ik maak een soort van forum afgeleid van een nieuwssysteem.
NU heb ik een probleem met de reacties, ik heb 3 reacties toegevoegd alleen als ik ze terug zie zijn ze allemaal het zelfde.
Dus als eerste zette ik bijv jah als 2de nee en als 3de mischien maar nu laat hij 3 keer jah zien
Hier is de code hopelijk weten jullie wat de fout is want ik word er echt gek van
Reacties.php
<?php
include ("config.php");
$sql1 = "SELECT * FROM reactiesugp WHERE nieuwsid='$id' ORDER by id ASC";
$query1 = mysql_query($sql1);
$aantal3 = mysql_num_rows($query1);
if ($aantal3 !="0"){
while ($show2 = mysql_fetch_object($query1)){
?>
<table width="100%" cellspacing="0" cellpadding="1" align="center">
<tr>
<td width="100%">
<font color="#FFFFFF" size="1"><? $show2->email = htmlspecialchars($show2->email); echo "<b>Re: $show->titel</b> Door: <a href=\"mailto:$show2->email\">$show2->naam</a> Uit: $show2->uit Op:$show2->datum "; ?>
</td>
</tr>
<tr>
<td width="100%">
<font color="#FFFFFF" size="1">
<?
$show2->bericht = htmlspecialchars($show2->bericht);
$show2->bericht = str_replace(":angry:", "<img src=Images/angry.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":D", "<img src=Images/biggrin.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":blink:", "<img src=Images/blink.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":blow:", "<img src=Images/blow.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":close:", "<img src=Images/closedeyes.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":blush:", "<img src=Images/blush.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":cool:", "<img src=Images/cool.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":dry:", "<img src=Images/dry.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":happy:", "<img src=Images/happy.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":huh:", "<img src=Images/huh.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":huil:", "<img src=Images/huil2.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":laugh:", "<img src=Images/laugh.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":mellow:", "<img src=Images/mellow.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":ninja:", "<img src=Images/ninja.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":ohmy:", "<img src=Images/ohmy.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":rolleyes:", "<img src=Images/rolleyes.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":sad:", "<img src=Images/sad.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":sleep:", "<img src=Images/sleep.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":)", "<img src=Images/smile.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":tongue:", "<img src=Images/tongue.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":unsure:", "<img src=Images/unsure.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":wacko:", "<img src=Images/wacko.gif border=0>", $show2->bericht);
$show2->bericht = str_replace(":wink:", "<img src=Images/wink.gif border=0>", $show2->bericht);
$bericht = nl2br($show2->bericht);
echo "$bericht"; ?>
</td>
</tr>
<tr>
<td width="100%"> <font color="#FFFFFF" size="1">
<div align="right"><a href="index2.php?ugp=topic&id=<? echo"$id"; ?>&sub=reageer">Reageer</a>
</div>
</td>
</tr>
</table><br>
<?
}} else {
?>
<table width="100%" cellspacing="0" cellpadding="1" align="center">
<tr>
<td b width="100%"><font color="#FFFFFF" size="1"><b>Geen
Reacties </b></td>
</tr>
<tr>
<td width="100%"><font color="#FFFFFF" size="1">Er
zijn nog geen reacties op dit topic!</td>
</tr>
<tr>
<td width="100%">
<font color="#FFFFFF" size="1">
<div align="right"><a href="index2.php?ugp=topic&id=<? echo"$id"; ?>&sub=reageer">Reageer</a>
</div>
</td>
</tr>
</table>
<? } ?>
<?php include ("config.php"); $sql1 = "SELECT * FROM reactiesugp WHERE nieuwsid='$id' ORDER by id ASC"; if ($aantal3 !="0"){ ?> <table width="100%" cellspacing="0" cellpadding="1" align="center"> <tr> <td width="100%"> <font color="#FFFFFF" size="1"> <? $show2->email = htmlspecialchars($show2->email); echo "<b>Re: $show->titel</b> Door: <a href=\"mailto:$show2->email\">$show2->naam</a> Uit: $show2->uit Op:$show2->datum "; ?> </td> </tr> <tr> <td width="100%"> <font color="#FFFFFF" size="1"> <? $show2->bericht = str_replace(":angry:", "<img src=Images/angry.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":D", "<img src=Images/biggrin.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":blink:", "<img src=Images/blink.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":blow:", "<img src=Images/blow.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":close:", "<img src=Images/closedeyes.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":blush:", "<img src=Images/blush.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":cool:", "<img src=Images/cool.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":dry:", "<img src=Images/dry.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":happy:", "<img src=Images/happy.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":huh:", "<img src=Images/huh.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":huil:", "<img src=Images/huil2.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":laugh:", "<img src=Images/laugh.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":mellow:", "<img src=Images/mellow.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":ninja:", "<img src=Images/ninja.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":ohmy:", "<img src=Images/ohmy.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":rolleyes:", "<img src=Images/rolleyes.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":sad:", "<img src=Images/sad.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":sleep:", "<img src=Images/sleep.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":)", "<img src=Images/smile.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":tongue:", "<img src=Images/tongue.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":unsure:", "<img src=Images/unsure.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":wacko:", "<img src=Images/wacko.gif border=0>", $show2->bericht); $show2->bericht = str_replace(":wink:", "<img src=Images/wink.gif border=0>", $show2->bericht); $bericht = nl2br($show2->bericht); </td> </tr> <tr> <td width="100%"> <font color="#FFFFFF" size="1"> <div align="right"><a href="index2.php?ugp=topic&id= <? echo"$id"; ?>&sub=reageer">Reageer</a> </div> </td> </tr> </table><br> <? }} else { ?> <table width="100%" cellspacing="0" cellpadding="1" align="center"> <tr> <td b width="100%"><font color="#FFFFFF" size="1"><b>Geen Reacties </b></td> </tr> <tr> <td width="100%"><font color="#FFFFFF" size="1">Er zijn nog geen reacties op dit topic!</td> </tr> <tr> <td width="100%"> <font color="#FFFFFF" size="1"> <div align="right"><a href="index2.php?ugp=topic&id= <? echo"$id"; ?>&sub=reageer">Reageer</a> </div> </td> </tr> </table> <? } ?>
|