newbornultra Posted December 5, 2012 Share Posted December 5, 2012 Hi there, I am having a little trouble with a hyperlink containing a query string to another site. On Chrome, it is recognised as a $_GET parameter, but it seems on the others (Firefrox/Safari/IE) it doesn't seem to be picking query string. if (isset($_REQUEST['q'])) { $rUrl=$_SERVER["HTTP_REFERER"]; echo "<pre>"; echo $rUrl; $url=parse_url($rUrl); $host=$url['host']; echo "</pre>"; } else { echo "<pre>"; var_dump($_REQUEST); echo "</pre>"; } and my test page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Untitled Document</title></head> <body><a href="http://domain.com/?q=puXs543543fi7654645n-baztbb65Kim9ra2KDX6F-nnu3z4crnpqFra67IiO54645qFh7iA">Link</a></body></html> Link to comment https://forums.phpfreaks.com/topic/271637-browser-support-for-query-string-_get/ Share on other sites More sharing options...
Muddy_Funster Posted December 5, 2012 Share Posted December 5, 2012 why are you using $_REQUEST when you know it's a $_GET variable anyway? Link to comment https://forums.phpfreaks.com/topic/271637-browser-support-for-query-string-_get/#findComment-1397701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.