I’ve created an online store within an android app in webview but have one major problem…
When im processing my shopping cart i go to a php file, save the items in a session variable and then use the following to bounce back to the page i was just on…
Header('Location:' . $_SERVER['HTTP_REFERER']);
This works perfectly on the android browser but unfortunately does not work in webview… Does anyone know how fix or a workaround for this please
One thing is though that it does work if i specify a location such as
Header('Location: shop.php');
So it seems that its $_SERVER[‘HTTP_REFERER’] which does not work… can anyone help with a work around please…
Not all browsers send a ‘referer’ string with the request, I suspect webview is one of these.
You should include the url the previous page was on within the form that you submitted, then you can use this.