I have 5 files stored in a dir /upload i.e file1, file2...)
These five file information are stored in a mysql database as shown below:
title cat1 cat2 cat3
file1 on off on //'on' means a file can belong to more than one category
file 2 off on on
I would like to have a form that as shown below:
title cat1 cat2 cat3 delete
file1 checkbox checkbox checkbox checkbox
file2 checkbox checkbox checkbox checkbox
- A user should be able to either check cat1's checkbox or all of the cat checkboxes at the same to update their status in the db. Also, he or she should be able check the 'delete' checkbox (not selecting other checkboxes) and delete this file from the /upload dir.
Please provide simple code please.