הממ.. יש לי בעיה כשאני מנסה למחוק משהו מהטבלה. יש לי את הקוד הזה-
קוד:
<?php
include "connect.php"; //including the connection
$news = mysql_query ("SELECT * FROM news");
while ($detailes = mysql_fetch_array($news)) {
echo "כותרת: ".$detailes['title']."<br />";
echo "איי די: ".$detailes['id']."<br />";
echo '<a href="'.$_SEREVR['PHP_SELF'].'" id="'.$detailes['id'].'" name="delete_news" />מחיקה</a> <br /><br />';
}
$delete = delete_news;
if (isset($delete)) {
mysql_query ("DELETE FROM news WHERE id='".$detailes['id']."'");
echo "העדכון נמחק בהצלחה!";
} else {
while ($detailes = mysql_fetch_array($news)) {
echo "כותרת: ".$detailes['title'];
echo "איי די: ".$detailes['id'];
echo '<a href="'.$_SEREVR['PHP_SELF'].'" id="'.$detailes['id'].' name="delete_news" />מחיקה</a>';
}
}
?>
וכשאני נכנס לעמוד ולוחץ על מחיקה, ההודעה של הecho אכן מגיעה, אבל התגובה לא נמחקת.
למה ומדוע?