I have a database of required skills for employees. There is a many to many relationship between the users table and the skills table, called user_skills. It contains the following fields: auto increment ID called user_skillsID, the foreign keys userID from the users table, and skillID from the skills table, a date field called tngdate and a "set" field called achieved. I have a form (called "updateskills.p hp") that the employees can open which brings up their un-achieved skills and presents a checkbox for them to check the skills that they can perform. The updateskills.ph p form action goes to "processskills. php", and when a checkbox is checked and the submit button is clicked, "processskills. php" opens, and an echo of the query displays: UPDATE user_skills SET achieved = 'Yes'WHERE user_skillID=62 84. The problem is that I have clicked the skill with the user_skillID= 6191, not 6284. 6284 is the last skill in the list. For my checkbox, I have the code as:
<input type="checkbox" name="achieved[]" value="Yes">
which is supposed to create an array, but it appears that it is NOT creating an array. I do not know how to fix this. No matter what I do, it keeps updating only the last record, no matter how many checkboxes I select. Each checkbox, however, does appear when I echo the $_REQUEST. Does anyone have any suggestions? I will be glad to post additional code if need be, but all else seems to be working correctly. Thank you in advance.
<input type="checkbox" name="achieved[]" value="Yes">
which is supposed to create an array, but it appears that it is NOT creating an array. I do not know how to fix this. No matter what I do, it keeps updating only the last record, no matter how many checkboxes I select. Each checkbox, however, does appear when I echo the $_REQUEST. Does anyone have any suggestions? I will be glad to post additional code if need be, but all else seems to be working correctly. Thank you in advance.
Comment