netman182 Posted February 29, 2012 Share Posted February 29, 2012 hey i am having a problem with the delete command. i have included the code for help. to me i don't see a problem but obviously there is. it is not deleting the field that the form is sending. it does complete the header fine. some advice would be great. <?php include("dbc.php"); $id = $_POST['id']; $sql="DELETE FROM players WHERE id= '$id' "; $result=mysql_query($sql); header("Location: masterrosteredit.php?msg=Your player was deleted"); mysql_close(); ?> Link to comment https://forums.phpfreaks.com/topic/257958-delete-problem/ Share on other sites More sharing options...
Pikachu2000 Posted February 29, 2012 Share Posted February 29, 2012 Have you echoed the query string to make sure it contains the value you'd expect it to contain? Link to comment https://forums.phpfreaks.com/topic/257958-delete-problem/#findComment-1322186 Share on other sites More sharing options...
l0gic Posted February 29, 2012 Share Posted February 29, 2012 Try using: $result=mysql_query($sql) or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/257958-delete-problem/#findComment-1322188 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.