![]() |
check $_GET isset then write it to variable? Please help
Hey guys I'm a php noob who's inherited this site and can't figure out how to check if the url has a variable in it, then set that variable as something else (sorry if the jargon's wrong)
PHP Code:
I've been trying to add the second }else{ statement to detect a variable in the URL (i.e. url.com/?ppc_ext=1234) then if it exists set $adCookie to that value, else return $defaultExt. does anyone know how to do this? Thanks for any help. |
I think you need single quotes as shown:
if(isset($_GET['ppc_ext'])){ $adCookie = $_GET['ppc_ext']; return $adCookie; |
Quote:
just in case anyone else was in need of this, here it is thanks to HuggyEssex on digitalpoint PHP Code:
|
| All times are GMT +1. The time now is 06:13 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.