Page is a not externally linkable
generic - 8:41 am on Jan 19, 2013 (gmt 0)
I'd love to see an example of how to keep and recall a specific url "state", it's been vexing me since yesterday.
The long and skinny of it is my company just launched a small retail end to our business with our entire product catalog sitting in a mysql database plugged into a public facing front end. I've built a tablet based interface, purely for people to search the catalog while in the showroom, so it's not like Joe Public is going to be using it - it literally sits on our counter in front of me and is secured away from prying eyes outside our network.
Having said that, the end user will never see the browser back/forward buttons because the tablet display is locked in full screen all the time, we got them purely for this. I tried history.go(-1), but when someone "likes" something or "adds to cart", it refreshes and adds a variable to the query string rendering a history(-1) not only useless, but downright nasty without the right checks in place. I'm not well versed in AJAX so I need a page refresh to make these functions happen.
So therein lies the crux of my issue. I need to be able to say something like:
if ( (!isset($add)) || (!isset($liked)) ) {
$referrer = HTTP_REFERER;
} else {
$referrer = $_SESSION['saved_referrer'];
}
...but I can't wrap my head around the syntax and how to make it all remember specific history items (and recall said items for that matter). Any further help or advice would be awesome. Sorry for being verbose, it's a weird issue to try to explain.