Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.