$("#bla").change(function(){ var value = document.getElementById('bla').value; if(value != 'none') $('select').each(function() { this.value = value; }); }); </script> <?php } if (isset($_POST['process_edit'])) { $count = 0; foreach ($_POST as $key => $value) { if (is_numeric($key)) { if ($SMAIL->edit_email($key, $value, $_POST['s-' . $key])) { $count++; } } } ?> <div class="jumbotron cc"> <div class="page-header"> <h2>Editing Emails</h2> </div> <p><?php echo $count; ?> Emails edited. Redirecting you to the manager...</p>