jeff5656 Posted December 13, 2008 Share Posted December 13, 2008 I am trying to delete a record but it doesn't work: Link next to each record: <a href="editbill.php?action=delete_record&id=<?php echo $row['dos_id']; ?>">Delete (irreversible)<?php echo $row['dos_id']; ?></a> editbill: break; case "delete_record": echo "hello"; echo $_GET['id']; $csq1 = "DELETE FROM dos WHERE dos_id = '" . $_GET['id'] . "'"; break; I get hello echoed and I get the correct id echoed so I know it gets to this part.... Link to comment https://forums.phpfreaks.com/topic/136847-solved-wont-delete-record/ Share on other sites More sharing options...
waynew Posted December 13, 2008 Share Posted December 13, 2008 Please post the entire code. Link to comment https://forums.phpfreaks.com/topic/136847-solved-wont-delete-record/#findComment-714697 Share on other sites More sharing options...
Mark Baker Posted December 13, 2008 Share Posted December 13, 2008 I don't see it here in your code. Are you actually executing a mysql_query($csql) to execute your delete statement? Link to comment https://forums.phpfreaks.com/topic/136847-solved-wont-delete-record/#findComment-714698 Share on other sites More sharing options...
jeff5656 Posted December 13, 2008 Author Share Posted December 13, 2008 Oh ok thanks I forgot this line: $result = mysql_query ($csq1) or die ("Invalid query: " . mysql_error ()); Now it works Link to comment https://forums.phpfreaks.com/topic/136847-solved-wont-delete-record/#findComment-714706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.