rendered paste body<?php
if(isset($_POST['delete']))
{
$id = $_POST['id'];
if(!get_magic_quotes_gpc())
{
$id = addslashes($id);
}
include 'library/config.php';
include 'library/opendb.php';
$query = "DELETE FROM news WHERE id='$id'";
mysql_query($query) or die("Error:".mysql_error());
include 'library/closedb.php';
?>
<form method="post">
<table width="700" border="0" cellpadding="2" cellspacing="1" class="box" align="center">
<tr>
<td width="100">id to delete</td>
<td><input name="id" type="number" class="box" id="id"></td>
<td colspan="2" align="center"><input name="save" type="submit" class="box" id="save" value="Save Article"></td>
</tr>
</table>
</form>
</body>
</html>