How can i show the path of visited links on each page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kamill
    New Member
    • Dec 2006
    • 71

    How can i show the path of visited links on each page?

    How can i show the path of visited links on each page, suppose from home page i have visited about_us then it should be as below

    home->about_us.htm

    Then suppose i have visited to contact_us.htm then it should be like as

    home->about_us.htm->contact_us.h tm

    Suggest me how can i get it.
    I have allready posted it in JavaScript forum, but now i need to do it through PHP.
    Regards
    Kamill
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    What I would do is store the page names in $_SESSION and then implode them or use a template:

    [code=php]
    $_SESSION['breadcrumbs'] += basename($_SERV ER['PHP_SELF']);
    $template = '<a href="{file}">{ file}</a>';
    foreach($_SESSI ON['breadcrumbs'] as $file)
    echo str_replace('{f ile}', $file, $template);
    [/code]

    Comment

    Working...