SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    My variables page does not work anymore

    On my main website I have a variables.php page so I can quickly check out the variables stored in the session:

    PHP Code:
    <?php session_start(); 
    echo 
    '<pre>'print_r($_SESSION); echo '</pre>';
    ?>
    <title>Variables</title>
    But now I'm working on a facelift to my website and currently have it stored in a sub-directory off the root. I have the same variables.php in that directory. When I login from the new version of the website, from the login page inside the sub-directory, everything goes fine, and it shows the "Welcome back Billy" message, so I know variables got loaded into the session from the database. But when I try to view the variables page, it just returns the following:


    Array()What am I missing here?Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Most likely your session has expired. Here is a nice write up about PHP session:

    http://www.tizag.com/phpT/phpsessions.php


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
  •