<?php
include('config.php');
if($action=="send"){
if($sp=="sp"){
mysql_query("DELETE FROM forum where id ='$id'");
}
else{
mysql_query("DELETE FROM forum where parent ='$sp'");
}}
$result = mysql_query("SELECT * FROM forum where ny ='1'");
$result = mysql_query("SELECT * FROM forum where ny <>'1'");
?><center><table width="600">
<td width="20%"><b>Slet ?</td>
</tr></table><hr width="600"><?
$result = mysql_query("SELECT * FROM forum order by parent,date");
while($row = mysql_fetch_array($result)) {
$g="gruppe";
$sp=$row["parent"];
$spr=substr($row["header"],0,50);
$svar=substr($row["message"],0,50);
if(!$spr){$spr='-'.$svar;$g="svar";$sp="$sp";}
?>
<center><table width="600">
<tr><form name="forum" method="POST" action="<?=$PHP_self?>?id=<?php echo $row["id"];?>&sp=<?php echo $sp;?>">
<td width="80%"><a class="text" link href="forum_svar.php?parent=<?php echo $row["parent"];?>"><?php echo $spr; ?></a></td>
<td width="20%">
<input type="hidden" name="action" value="send">
<input type="submit" value="Slet <?php echo " ".$g; ?>">
</td></form>
</tr></table><hr width="600">
<?php
}
mysql_free_result($result);
?>
Har det scripts til at slette... men det virker ik... nogen der kan sige mig hvad der er forkert... du kan se hvordan der ser ud --->
http://noxiaz.csclan.dk/index/forum/scripts/slet.php
<--- for mig ser det rigtigt ud men jeg er jo ikke så god til det :D hehe plzz hjælp mig