redbishop — 2013-09-06T07:01:51-04:00 — #1
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?
I'm trying to figure this out, so I'd be grateful if someone could save me a few hours.
Thank you !
solidcodes — 2013-09-06T07:07:35-04:00 — #2
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?
redbishop — 2013-09-06T07:27:58-04:00 — #3
uhm, I'm not actually trying to "reinvent the wheel"...
solidcodes — 2013-09-06T07:55:53-04:00 — #4
So what is the name of the class you are using?
solidcodes — 2013-09-06T08:03:18-04:00 — #5
kylewolfe — 2013-09-06T10:12:21-04:00 — #6
You can use $SERVER['HTTPREFERER'] 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.
redbishop — 2013-09-06T11:03:10-04:00 — #7
it's working fine - thanks!