solution: something like this:
Code:
<?php
if($_GET['article_id']){
$sql = "DELETE FROM news WHERE id = '".$_GET['article_id']."' LIMIT 1";
# ...
} else {
$sql = "SELECT id, Title FROM news ORDER BY id DESC";
while($row = mysql_fetch_assoc(mysql_query($sql)))
echo '<p>
<a href="'.$_SERVER['PHP_SELF'].'?article_id='.$row['id'].'">Edit: '.$row['Title'].'</a>
</p>';
}
?>
obviously run some checks on the var like:
Code:
if(!is_numeric($_GET['article_id'])) die("article_id is not a numeric number1");