Support » Fixing WordPress » Passing $_SESSION Variables

  • I am having problems passing varriables from my non word press section to word press and also within word press.

    the following code is part of a side bar and half of the time it picks up the $_SESSION[‘user’] and displayes it and half of the time it doesn’t.

    <div class=”logst”><center>
    <?php if (isset($_SESSION[‘user’])) { ?>
    <center>Logged in as <span class=”namlb”>
    <?php echo $_SESSION[‘user_name’]; ?> </span>
    Settings | Logout </center></div>
    <?php } ?> <?php if (!isset($_SESSION[‘user’])) { ?>
    <p class=”logst”>MembersSection
    Login | Sign Up </p>
    <?php } ?>

    Then in the main body of a word press page I have:

    <tr><td class=”logtb” style=”width:250px;”><div align=”center”><font class=”Logh”>My Account</font></div>
    Logged as <?php echo $_SESSION[‘user_name’]; ?> | Settings | Logout <?php } ?> </td></tr></table>

    And it never finds the

    Any Help would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • More information on this.

    I am trying to integrate my web site with word press. the values that I am trying to pass are from a separate database and are called/ quereyed by nonword press pages and then passed into the SESSION array.

    when I return to the web site the varriables are still in the SESSION and seem to work fine.

    I am hopeing to be able to completely transfer my whole site to word press but I can’t figure this out. This would be only the first hurdle to pass in converting the web site…

    Anyone have any info on using SESSION Globals?
    I have tried several fixes but none seem to work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Passing $_SESSION Variables’ is closed to new replies.