Ok. Thanks for your reply. Have now done that you pointed out, but the problem is not fixed quite yet. (Yet all the Error is gone). When I press, I will be directed to a page (no.php ago, I made) and when I go back nothing has happened. There is certainly something in the code, which I do not quite understand myself. Here is the updated code:
PHP Code:
<h3>Delete one or more articles</h3><hr/>
<?php
$connect = mysql_connect('localhost', 'root', '');
if(!$connect){
die('Unable to connect to: '. mysql_error());
}
mysql_select_db('minicms', $connect);
$result = mysql_query('SELECT * FROM article ORDER BY id DESC');
if(@$_GET['deleteid']){
$delete_one = mysql_query('DELETE FROM article WHERE id = $_GET["deleteid"] LIMIT 1');
echo 'The text was deleted!';
}
while($row = mysql_fetch_assoc($result)){
echo '<a href="index.php?page=delete_article?deleteid=' . $row['ID'] . '">';
echo $row['ID'].', ';
echo $row['title'].', ';
echo $row['date'].' '.$row['time'].'<br/><br/>';
echo '</a>';
}
?>
Bookmarks