I am trying to write a script that will remove a record from a MySQL database. The script goes like this:
<?php
if ($submit) {
// process form
$sql = "DELETE FROM 'news' WHERE 'id'='$id'";
$result = mysql_query($sql);
echo "The news story has been removed from the site.\n";
} else {
// display form
?>
<?php
$db = mysql_connect("localhost","bornrun","");
mysql_select_db("bornrun_uk_db",$db);
$request = "SELECT * FROM news order by id desc.$id";
$result = mysql_query($request);
?>
</head>
<body bgcolor="#c0c0c0">
<?php
while ($row = mysql_fetch_array($result)) {
?>
<center>
<font size="2" color="#ff0000" face="Arial"><b>
<?php echo $row['headline']; ?>
</b></font> -
<font size="1" color="#000000" face="Arial">
<?php echo $row['date']; ?>
</font>
<br />
<font size="2" color="#000000" face="Arial">
<?php echo $row['leader']; ?>
<br />
<br />
<input type="submit" name="submit" value="Delete">
 
 
 
<input type="submit" name="edit" value="Edit">
<br />
<hr />
<br />
</center>
</form>
<?php
}
?>
</body>
</html>
I am getting a parse error on line 94. I have triple checked my script and I can't find anything wrong with it at the moment.
I hope you guys can find something wrong with it!
Thanks,
Bailz.