SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jul 2013
    Location
    South of the equator, then turn left
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Breadcrumb navigation on dynamic website

    Hi everyone,

    I have a question about implementing breadcrumbs on a dynamic website.

    How can I retrieve the previous page's URL so that I can use it in my breadcrumb navigation on my current page? With GET?



    PHP Code:
    page5.php?city=Amsterdan&foo=bar 

    I'm trying to figure this out, so I'd be grateful if someone could save me a few hours.


    Thank you !

  2. #2
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    911
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi please don't re-invent the wheel.
    There are already ready made classes for this.
    Just Google PHP breadcrumbs class.

    Or what PHP framework are you using?
    I Love coding...
    Don't click this link.

  3. #3
    SitePoint Addict
    Join Date
    Jul 2013
    Location
    South of the equator, then turn left
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    uhm, I'm not actually trying to "reinvent the wheel"...

    thanks anyway

  4. #4
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    911
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    So what is the name of the class you are using?
    I Love coding...
    Don't click this link.

  5. #5
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    911
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Try,

    $_SERVER['HTTP_REFERER']
    I Love coding...
    Don't click this link.

  6. #6
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,075
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    You can use $_SERVER['HTTP_REFERER'] if youi only want the previous peage, or if you want more than that, you can store each page to a session variable. $_SESSION allows for you to store data across page requests.

  7. #7
    SitePoint Addict
    Join Date
    Jul 2013
    Location
    South of the equator, then turn left
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi all,

    it's working fine - thanks!


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
  •