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 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question IE & Firefox with Session

    Hi,

    Is there anything that I miss out in my code? When I used IE the session['err'] will show that it does not exist. But in Firefox, the session['err'] will show that it Exist? Why is this so? I am very puzzle.

    This are my codes.
    PHP Code:
    <?php session_start();?>
    <html>
    <head>
    <title>test</title>
    </head>

    <body>

    <p>
    <?php 
    if(isset($_SESSION['err']))
    {
            
    $_SESSION['err'] = "Exist";
            echo 
    $_SESSION['err'];
    }
    else
    {
              
    $_SESSION['err'] = "Does not Exist";
            echo 
    $_SESSION['err'];
    }
    ?>
    </p>
    <form id="form1" name="form1" method="post" action="./redirect.php">
      <p>test
        <input name="test" type="text" id="test" />
      </p>
      <p>
        <input type="submit" name="Submit" value="Submit" />
    </p>
    </form>
    <p>&nbsp;</p>
    </body>
    </html>
    PHP Code:
    <?php
    session_start
    ();
    $test "";
    $test $_POST['test'];

    if(
    $test == "")
        
    $_SESSION['err'] = "test";
        
    header('Location: ./test.php');
    ?>

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,042
    Thanks
    19
    Thanked 42 Times in 42 Posts
    help spread firefox
    www.spreadfirefox.com


  •  

    Posting Permissions

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