<a href = "delete.php?cid=<?php echo $id ?>"onclick="return confirm('Are you sure you want to delete?')">Delete Contractor</a>
Normally I’ve never had an issue with deleting rows out of databases until now, this has me stumped. So when I click on the link, it doesn’t do anything, no errors, just dead.
please let me know if you need to see the site to accommodate this. I currently only have local version of it.
When you hover over the link, does the value of cid show what you would expect? Does it actually call the delete.php script, and if so, what is the value of $id when it gets there?
Does a record with the specified id actually exist to be deleted?
What happens if you change the id in the address bar and then resubmit the page - can you delete any of the other rows in the table by updating the address for the delete page?
If you don’t have any known access controls in place (that might have become broken), it might be that they got changed somehow unbeknownst to you. (eg. if you rearranged / renamed things)
Not per se related to your question, but I would like to add that you should never use string concatenation to build queries - you risk SQL injection this way. Please use prepared statements with bound variables as explained here.
So is it actually calling delete.php which is then failing to perform the delete, or is it failing to call delete.php? Does delete.php actually start running?