hi everyone, i want to get the full url of address bar (including queries) inside a hidden field. this is an asp example: <input type="hidden" name="my_url" value="<% Dim strDomain, strPath, strQueryString, strURL strDomain = Request.ServerVariables("HTTP_HOST") strPath = Request.ServerVariables("URL") strQueryString = Request.ServerVariables("QUERY_STRING") strURL = "http://" & strDomain & strPath & "?" & strQueryString response.write strURL %>"/> HTML: can anybody convert this to php? thanks in advance.
Try this: <input type="hidden" name="my_url" value=" <? $strDomain=$_SERVER["HTTP_HOST"]; $strPath=$_SERVER["URL"]; $strQueryString=$_SERVER["QUERY_STRING"]; $strURL="http://" . $strDomain . $strPath. "?" .$strQueryString; echo $strURL; ?> "/> PHP: Don't really know if it works Just put that up in random. Don't have time to try it yet.