yobo Posted March 4, 2007 Share Posted March 4, 2007 hey all i have a slight error for some reasson i can't delete from the database using my php script Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\dnbcorn\del_dj2.php on line 7 here is my coding <?php include 'include\db.inc.php'; //delete dj $id = $_GET['id'] $delete = mysql_query("DELETE FROM dj WHERE id='$id' "); if ($delete) { echo '<p>DJ Deleted!</p>'; }else{ echo '<p>error deleting dj</p>'; } ?> <p><a href="main_dj.php">Main menu</a></p> not sure why it is saying that? joe Link to comment https://forums.phpfreaks.com/topic/41122-solved-unable-to-delete-from-database-using-php/ Share on other sites More sharing options...
Orio Posted March 4, 2007 Share Posted March 4, 2007 I am not sure if you solved this or not, but you forgot a semicolon after $_GET['id']. Orio. Link to comment https://forums.phpfreaks.com/topic/41122-solved-unable-to-delete-from-database-using-php/#findComment-199179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.