Forum Moderators: coopster
I have a script that exits to the same page it was run on but also passing data in the address bar, to say what should be showed on the page, however as this script is run on several pages i have had to generate the url dynamically,
using
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
the problem i have is every time i use $url in the header it gets a new ?***** added to it, i have tried to figure a way round this using string replace to remove ?**** after each page loads but have so far have had no success, can anyone shed any light on this.
$_SESSION['url'] = str_replace(?*,'',$url);
is the one of the string replaces i have tried.
thanks
$url = 'http://' . $_SERVER['HTTP_HOST'] . trim($_SERVER['REQUEST_URI'], '*?');
Try that and see what you get.