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?

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 !

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?

Hi,

uhm, I’m not actually trying to “reinvent the wheel”…

thanks anyway

So what is the name of the class you are using?

Try,

$_SERVER[‘HTTP_REFERER’]

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.

Hi all,

it’s working fine - thanks!