How do I keep single checkbox stay checked after refreshing the page?
问题 HTML code: <div class="wrap"> <h3>Background Swap:</h3> <form action="" method="POST"> <div id="checkbox-container"> Shadowless background: <input type="checkbox" name="new_background" id="checker" <?php echo (isset($_POST['new_background']))? "checked='checked'": "";?>/><br /><br /> </div> <input type="submit" name="submit" value="Upgrade Background" class="button" /> </form> </div> This will make the checkbox stays checked, but when page is refresh or exit and comes back, the checkbox will