SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    cross browser session

    PHP Code:
    <title>mySession1</title>
    <?php
    $_SESSION
    ['$mySession']=1;
    ?>
    <br>
    <a href="mySession1.php"> mySession1</a><br>
    <a href="mySession2.php"> mySession2</a><br>
    <a href="mySession3.php"> mySession3</a><br>
    PHP Code:
    <?php session_start(); ?>
    <title>mySession2</title>
    <?php
    echo $_SESSION['$mySession'];
    ?>
    <br>
    <a href="mySession1.php"> mySession1</a><br>
    <a href="mySession2.php"> mySession2</a><br>
    <a href="mySession3.php"> mySession3</a><br>
    PHP Code:
    <title>mySession1</title>
    <?php
    unset ($_SESSION['$mySession']);
    ?>
    <br>
    <a href="mySession1.php"> mySession1</a><br>
    <a href="mySession2.php"> mySession2</a><br>
    <a href="mySession3.php"> mySession3</a><br>
    I have the 3 page like the above.
    Because mySession2.php has "echo $_SESSION['$mySession'];",
    it should print the value "1" when you open the file through mySession1.

    googleChrome prints the value "1".
    But fireFox doesn't print it.

    How can I make it Both googleChrome and fireFox print the value 1 ?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Override the session handler functions and handle them manually removing the browser as part of the equation. Probably not something that is within your skill range right now based on the questions you have been asking. I would move on to less advanced task and circle back around to this when you knowledge of PHP is more at an intermediate or advanced level. Though knowing how much you love the manual here you go.


Bookmarks

Posting Permissions

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