I am a php newbie and am trying to get a form to work with multiple checkboxes that retain their values after moving away from the page using session variables, here is the code: PHP: <?phpsession_cache_limiter('private_no_expire');session_start();$_SESSION['DB'] = (isset($_POST['check_list']) ? $_POST['check_list'] : (isset($_SESSION['DB']) ? $_SESSION['DB'] : ''));?><!DOCTYPE html><html><head><title>PHP: Get Values of Multiple Checked Checkboxes</title></head><body><h2>PHP: Get Values of Multiple Checked Checkboxes</h2><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"><?phpif(isset($_POST['submit'])){if(!empty($_POST['check_list'])) {$checked_count = count($_POST['check_list']);echo "You have selected following ".$checked_count." option(s): <br/>";foreach($_POST['check_list'] as $selected) {echo "<p>".$selected ."</p>";}}else{ echo "<b>Please Select Atleast One Option.</b>";}}?><label class="heading">Select Your Technical Exposure:</label><input type="checkbox" name="check_list[]" value="C/C++" <?php if(isset($_SESSION['DB'])) { foreach($_SESSION['DB'] as $selected) { if($selected == "C/C++") { echo "checked=\"checked\""; break; }}} ?><label>C/C++</label><input type="checkbox" name="check_list[]" value="Java" <?php if(isset($_SESSION['DB'])) { foreach($_SESSION['DB'] as $selected) { if($selected == "Java") { echo "checked=\"checked\""; break; }}} ?><label>Java</label><input type="checkbox" name="check_list[]" value="PHP" <?php if(isset($_SESSION['DB'])) { foreach($_SESSION['DB'] as $selected) { if($selected == "PHP") { echo "checked=\"checked\""; break; }}} ?><label>PHP</label><input type="checkbox" name="check_list[]" value="HTML/CSS" <?php if(isset($_SESSION['DB'])) { foreach($_SESSION['DB'] as $selected) { if($selected == "HTML/CSS") { echo "checked=\"checked\""; break; }}} ?><label>HTML/CSS</label><input type="checkbox" name="check_list[]" value="UNIX/LINUX" <?php if(isset($_SESSION['DB'])) { foreach($_SESSION['DB'] as $selected) { if($selected == "UNIX/LINUX") { echo "checked=\"checked\""; break; }}} ?><label>UNIX/LINUX</label><input type="submit" name="submit" Value="Submit"/></form></body></html> The problem is that even if no checkboxes are checked after the form has been submitted, the checkboxes still pick up the last values selected rather than being blank. Thank you for your time!.