Jump to content

[SOLVED] PHP: Preserving checkbox key even when all arent checked?


justravis

Recommended Posts

I am trying to write a function that will recheck a checkbox if it was checked when submitted.  The problem is the checkbox array only includes checkboxes with a value, so the order of the checkbox array changes.  For example, if I only check 1 random checkbox, it will only check the first checkbox.

 

Any ideas on a workaround?

 

How would you handle such a situation?

 

Thanks!!!

Jeni,

I've been experimenting all day, but checking the value instead of the key FINALLY hit me shortly after posting.  I wanted to go back to the drawer board before declaring this topic SOLVED.

 

Thanks again!  You have been very helpful on a variety of topics now.

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.