Parašė avice· 2012 Lie. 9 19:07:52
#5
labai jau nepatogiai padarytas tas tavo kodas...
Bandyk:
echo "<td>
<form name='deleteWish' action='".$PHP_SELF."?nuo=$nuo' method='POST'>
<input type='hidden' name='id' value='".$data['download_id']."'/>
<input type='submit' name='delete' value='Delete'>";
if (isset($_POST['delete'])) {
$test = mysql_query("delete from ".$db_prefix."downloads where download_id='".$_POST['id']."'") or die(mysql_error());
echo ($test ? "<script>alert('Istrinta');</script>" : "<script>alert('klaida');</script>";
}
echo "</form>
</td>\n";