Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member ericbusch's Avatar
    Join Date
    Aug 2003
    Location
    Daejeon, South Korea
    Posts
    241
    Member #
    2779
    How can I create a script that uses session functions to remember which pages a user has visited thereby providing the user with a list of links on each page to make it easy for the user to retrace their steps?

    Eric
    Blogs For Sale - Each blog is packed with 1000s of signatures and ads are highly integrated into the site. Great CTR! Completely customizable from Admin CP. On Sale!
    Complete Websites For Sale - Fantastic looking sites rich with content. Come complete with domain names. I only have a couple of these.

  2.  

  3. #2
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    Firstly, you have to create a new session, and check at every page. The way to do this is the same throughout, like so:

    <?php
    start_session();
    ?>

    This should be at the top of every PHP page, before any spaces or anything else being outputed. The start_session() function either creates a new session if one is not defined, or starts working with the currently defined session.

    The next step is storing the URLs. PHP provides a convenient place, in the form of the $_SESSION array. If the only thing you are storing is the URLs, then the simplest way of storing the URLs is:

    $_SESSION[] = $_SERVER["REQUEST_URI"];

    Then to print them out, just use your favourite method of reading through an array. One way to do it:

    foreach($_SESSION as $url){
    echo "<a href=\"$url\">$url</a>.";
    }

    These are just pointers to get you started. Post back for more help later to work out any details...
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.

  4. #3
    Senior Member ericbusch's Avatar
    Join Date
    Aug 2003
    Location
    Daejeon, South Korea
    Posts
    241
    Member #
    2779
    Thanks eKstreme,

    I will give this a try and see how it works. It seems simple enough. I'll let you know how it goes or if I have any questions.

    ERic
    Blogs For Sale - Each blog is packed with 1000s of signatures and ads are highly integrated into the site. Great CTR! Completely customizable from Admin CP. On Sale!
    Complete Websites For Sale - Fantastic looking sites rich with content. Come complete with domain names. I only have a couple of these.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:47 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com