witam mam problem napisalem takie cos lecz ten srypt kasuje mi tylko 1 wpis a nie wszystkie ;/
<?php
function shout_lista()
{
$query = "SELECT * FROM shoutbox";
echo '<form action="index.php?cmd=shout&cmd=shout_del1" method="POST">';
$id = $row['id'];
$date = $row['date'];
$autor = $row['autor'];
$text = $row['text'];
echo '<table cellpadding="2" cellspacing="0" border="0" class="table0" width="100%">
<tr>
<td class="row1" width="100%"><span class="gensmall" style="font-size:9px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif">
<input type="checkbox" name="id" value="'.$id.'" /> ['.$date.']</span><span class="gensmall"> '.$autor.': '.$text.'</span></td>
</tr>
</table>
<hr size="1">
';
if ($cmd == 'shout_del1') {
shout_del();
}
}
echo '<input type="hidden" name="cmd" value="shout_del" /><input type="submit" name="Usun" value="Usun" /></form>';
}
function shout_del()
{
global $PHP_SELF, $id, $op, $tytul;
$query = "DELETE FROM shoutbox WHERE id='$id'";
echo "<script>self.location.href=\" index.php?cmd=shout\";</script>";
}
?>