Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    if statement doing one thing at a time

    When i do this
    Code:
    <?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?

  • #2
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,560
    Thanks
    76
    Thanked 105 Times in 104 Posts
    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.

  • #3
    Banned
    Join Date
    Mar 2011
    Location
    Ahmedabad
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    hop this link will help you to solve this problem /phpsense.com/2006/php-login-script/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •