I'm trying to get the $_POST value from a previous page.
<form method="POST">
<input type="checkbox" name="hey"<?php if (isset($_POST['hey'])) echo " checked"; ?>>
<input type="submit">
</form>
And any values must be kept in the hidden form, and it makes that the form values doesn't update if you change a check:
<form method="POST">
<?php
if ($_POST['hey'] == 'on') {
?>
<input type="hidden" name="hey" value="on" />
<?php
}
?>
<input type="checkbox" name="hey"<?php if (isset($_POST['hey'])) echo " checked"; ?>>
<input type="submit">
</form>
This structure may sound weird (due to the CMS specification), anyway, if it changes I have to get input values, not hidden values, and all hidden forms should be written in the source. Any idea?