Forum Moderators: coopster
Currently I have a page which allows me to add users to an event. I have a drop down menu with the users, and my goal is to be able to add users to a table, so when I want to display the event, I can also see the users who are to attend. As it stands now, I have it coded, albeit incorrectly. I can submit users, I can display them with the event correctly, but I am having a couple issues.
1) Anytime I hit F5, a blank record is added to the table.
2) I cannot for the life of me figure out how to delete a user from the list! I understand it in theory, bgut I cannot figure out how to tie a sqlquery DELETE to an HTML link which when pressed will execute the query.
So, is it possible to tie a sql INSERT query into an HTML 'Submit' button? Is it possible to tie a sql DELETE query to an HTML link?
Any help is appreciated. I can post code, once I sanitize it of the garbage html tags which clutter up my already-confusing php ;)
To tie your query to your buttons/links you need to attach the PRIMARY KEY values to those associated <input> elements so that you can use those values in your query.