PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm having a tough time getting this code to delete records from my SQL table. Once again, I know it's something I'm doing wrong but I can't figure it out. Everything is displayed properly, including the checkboxes and the delete button but when I select one of the checkboxes and click on the delete button the page just refreshes. I hope someone can help. Thanks.
Also, hopefully you are manually assigning $delete and more importantly $checkbox and validating the information contained in them. Would suck for someone to just come along and post $checkbox[] = % There goes all your records.
echo $sql; displays nothing.
I can completely re-write this code but to give you an idea of what I'm trying to do, in the "while" loop I display images from a table that is specific to a user. I also display a checkbox to allow the user to decide which images to delete. The delete button is at the bottom of the images. I am lost when it comes to how the checkboxes and delete button are processed. I know how to validate forms but I don't know what to do when it comes to checkboxes. I can create a "processor" file to delete the server image files and the SQL records but I don't know what to look for in the "processor" file. In other words, how do I store the checkboxes that have been checked? And where do I store that information in the "while" loop? I'm still new at this so please be patient with me and thanks for your help.