Link to home
Start Free TrialLog in
Avatar of MarleneAyers
MarleneAyers

asked on

PHP Sticky checkboxes

I have a form with a series of checkboxes. If the user does not complete other information on the form, user submits, the form is redisplayed and I want the completed fields to be sticky. (I think that is the right term fields already completed to redisplay) including the checkboxes.

<input type="checkbox" name='otherMarketing[]' value="membership" id="membership"  <?php if ($_REQUEST[otherMarketing][membership]=='membership') { echo "checked";} ?> />
                  
Avatar of snoyes_jw
snoyes_jw
Flag of United States of America image

You'd have to name the checkbox 'otherMarketing[membership]' for that to work as written.
ASKER CERTIFIED SOLUTION
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial