What if there are multiple things like id=1&message=2?
To get the actual URL I do:
$querystring = $_SERVER['QUERY_STRING'];
echo $querystring;
if ($querystring == ""){
$url = $PHP_SELF;
//echo $url;
}else{
$url = "".$PHP_SELF."?$querystring";
//echo $url;
}
This shows the correct query string.
The form is now:
echo "<form action=\"http://www.website.com/~web/file.php?action=new&redirecturl=$url\" method=\"post\">";
To get the URL from the form I do:
$redircturl = $_GET['redirecturl'];
echo "<meta http-equiv='refresh' content='1;URL=$redirecturl'>";
It seems to work fine until it gets to the part where it does the actual redirecting. When it gets here it it drops the second variable in the query. Any way how to solve that?