...

View Full Version : if statement doing one thing at a time



deadman
09-15-2011, 02:43 AM
When i do this



<?php if($_POST[reset]) {
unset($_SESSION[counter]);
unset($_SESSION[display]); } ?>

with a submit button with the name reset...

when i do it this way it resets the counter on the first click then display on the second... is there a way to do it with one click?

myfayt
09-15-2011, 02:49 AM
If a variable has been unset with unset(), it will no longer be set. isset() will return FALSE if testing a variable that has been set to NULL. Also note that a NULL byte ("\0") is not equivalent to the PHP NULL constant.

If multiple parameters are supplied then isset() will return TRUE only if all of the parameters are set. Evaluation goes from left to right and stops as soon as an unset variable is encountered.

AimyThomas
09-15-2011, 08:00 AM
hop this link will help you to solve this problem /phpsense.com/2006/php-login-script/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum