Delete a Message
antp
in the checkbox:
and the variable itself is initialized like that:
So by default it should be checked, and the state should be remembered.
The code is a little weird maybe.
I could imagine that the cookie would be wrongly read afterwards for some reason; but if there is no cookie defined at the first place, I don't see how it it could not being checked.
Maybe I should not pass any value instead of "false", to remove the cookie completely in case the box is checked...
and the variable itself is initialized like that:
- if($validPost)
- {
- $autoresize = isset($_POST['autoresize']) && $_POST['autoresize'];
- if(!$autoresize)
- setcookie('imcdb_noautoresize', true, time() + 60*60*24*60);
- else
- setcookie('imcdb_noautoresize', false);
- }
- else
- if(isset($_COOKIE['imcdb_noautoresize']) && $_COOKIE['imcdb_noautoresize'])
- {
- $autoresize = false;
- }
- else
- {
- $autoresize = true;
- }
So by default it should be checked, and the state should be remembered.
The code is a little weird maybe.
I could imagine that the cookie would be wrongly read afterwards for some reason; but if there is no cookie defined at the first place, I don't see how it it could not being checked.
Maybe I should not pass any value instead of "false", to remove the cookie completely in case the box is checked...