Jump to content

Recommended Posts

Hi All

 

If I have a checkbox in a form like: 

 

<input type="checkbox" name="RememberMe" />

 

What is the best technique to ensure if the user checks it, this is remembered when the form is posted back on itself. 

 

Thanks for any advice. 

 

Rgds

Thanks for your reply. 

 

To clarify, I meant to remember whether that the user had decided to check the checkbox or not.  i.e. if they check it and then postback the form, and the form has to be redisplayed because of an error in another field, the form should redisplay with the checkbox checked. 

 

Rgds

OK guys, I've come up with the solution and put together an explanatory tutorial: 

 

http://www.webref.eu/php-script-remember-checkbox-status-on-postback.php

 

It works as I wanted, but if anyone has any comments, please post here. 

 

Rgds

 

 

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.