Jump to content

POST and checkboxes list


Chris Val Kef

Recommended Posts

can i POST all checked and unchecked ckeckboxes in one table somehow?

i think that $_POST keeps a table only with the checked ones.

i got this kind of form with multiple checkboxes: <input type="checkbox" name="check[]" value="{CLASS_ID}" {CHECKED}>

all i want to do is to:

    a. if is ckecked then insert somehing in db
    d. is it was checked and user unchecked it then delete something from db

hope someone got it!
Link to comment
https://forums.phpfreaks.com/topic/28229-post-and-checkboxes-list/
Share on other sites

Only checked checkboxes are returned to your processing script, so unless you save the previous state of the checkboxes you won't be able to do what you want.

Just a comment on your idea... That is a bad user interface. The insert and delete action should be control via different check boxes. A delete should be the result of a positive action by a user.

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.