phpretard Posted May 8, 2008 Share Posted May 8, 2008 I am trying to pass this twice to a $_GET and it will only show the first word on the second pass. When I pass it the first time is shows in the browser like so ?page=secure/main&Spage=admin/invoices&s=category&c=ENS%20Metals%20and%20Jewelry,%20Inc. and it echos the full name... When I send it again as a variable it only echos ENS I think the %20 (spaces) are screwing it up Does anyone know why? $c=ENS Metals and Jewelry ?page=secure/main&Spage=admin/invoices&s=category&c=$c&p=products Link to comment https://forums.phpfreaks.com/topic/104677-i-_get-problems-with-a-_get/ Share on other sites More sharing options...
MadTechie Posted May 8, 2008 Share Posted May 8, 2008 would need to see some code, your probably filtering it, relly you should use urlencode/urldecode Link to comment https://forums.phpfreaks.com/topic/104677-i-_get-problems-with-a-_get/#findComment-535752 Share on other sites More sharing options...
phpretard Posted May 8, 2008 Author Share Posted May 8, 2008 There really isn't much more code than what you see. Page 1. <a href=\"page2.php?c=ENS Metals and Jewelry\">GO TO PAGE 2</a> -------------------------------------------------------------------------------------- [code] Page 2. <? $c=$_GET['c']; echo $c; // ON PAGE 2 IT ECHOS: ENS Metals and Jewelry echo"<a href=\"page3.php?c=$c\">GO TO PAGE 3</a>"; ?> NOTE: On page 2 the address bar reads: page2.php?c=ENS%20Metals%20and%20Jewelry -------------------------------------------------------------------------------------- Page 3. <? $C=$_GET['c']; echo $c; // ON PAGE 3 IT ECHOS: ENS ?> [/code] Link to comment https://forums.phpfreaks.com/topic/104677-i-_get-problems-with-a-_get/#findComment-535756 Share on other sites More sharing options...
MadTechie Posted May 8, 2008 Share Posted May 8, 2008 Well $C=$_GET['c']; should be $c=$_GET['c']; apart from that its fine Link to comment https://forums.phpfreaks.com/topic/104677-i-_get-problems-with-a-_get/#findComment-535766 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.