Forums
This topic is locked
Delete row
Posted 28 Nov 2006 10:48:03
1
has voted
28 Nov 2006 10:48:03 sally bierton posted:
i have a table in my database that has 2 fields....id and newsT...i have a form that enables you to enter the id, and a button to then delete.but for some reason its not working.
here is my code...any suggestions please.
<?
include ("connection.php"
$id=$_GET['id'];
$query = "DELETE newsT FROM news WHERE id=$id";
echo $id;
$result = mysql_query($query) or die ("Could Not delete Record In Database."
?>
Replies
Replied 01 Dec 2006 13:37:07
01 Dec 2006 13:37:07 Roddy Dairion replied:
try this delete query
<pre id=code><font face=courier size=2 id=code>
delete from newsT where id = $id
</font id=code></pre id=code>
<pre id=code><font face=courier size=2 id=code>
delete from newsT where id = $id
</font id=code></pre id=code>