I have tried several combinations and just can't get this right. I am getting "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM bookmarks WHERE bid = 11' at line 1" when I click the URL.
Here is the href: <a href="deleterecord.php?bmID=<?php echo $rowbm;?>">Delete</a>
And here is the PHP:
<?php
include "connect.php";
if(!isset($_SESSION['uname'])){
header("location:login.php");
}
if(isset($_GET['bmID'])){
if(is_numeric($_GET['bmID'])){
$id = mysql_real_escape_string($_GET['bmID']);
$del = "DELETE * FROM users WHERE bid = $id";
if(mysql_query($del)){
header("location:main.php");
}else{
echo mysql_error();
}
}
}
?>
I'm sure it is something simple but I am still learning so I have an excuse :) Could someone help me out please?