WordPress.org

Forums

Passing $_SESSION Variables (3 posts)

  1. alfredwestlake
    Member
    Posted 5 years ago #

    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:

    <h1>Registration</h1><div>
    <table>
    <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>
    </div>

    And it never finds the
    $_SESSION['user_name']

    Any Help would be appreciated.

  2. alfredwestlake
    Member
    Posted 5 years ago #

    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...

  3. alfredwestlake
    Member
    Posted 5 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic