frizzo Posted June 13, 2008 Share Posted June 13, 2008 I have this code: if ($_GET['product'] == 'game1') { header('Location: http://URL_HERE'); exit(); } How can I add an extra variable, such as a keyword to be caught from the URL the string, like: http://siteurl.com?product=game1&kw=gamex Thanks. Link to comment https://forums.phpfreaks.com/topic/109993-solved-adding-an-extra-var-to-string/ Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 What? Just add it on like you did in the example... O_O Link to comment https://forums.phpfreaks.com/topic/109993-solved-adding-an-extra-var-to-string/#findComment-564423 Share on other sites More sharing options...
frizzo Posted June 13, 2008 Author Share Posted June 13, 2008 So like this? if ($_GET['product'] == 'game1') && ($_GET == ['gamex']) Link to comment https://forums.phpfreaks.com/topic/109993-solved-adding-an-extra-var-to-string/#findComment-564425 Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 $_GET['kw'] == 'gamex' Link to comment https://forums.phpfreaks.com/topic/109993-solved-adding-an-extra-var-to-string/#findComment-564427 Share on other sites More sharing options...
frizzo Posted June 13, 2008 Author Share Posted June 13, 2008 oh, yes -- that worked. Thanks alot! Link to comment https://forums.phpfreaks.com/topic/109993-solved-adding-an-extra-var-to-string/#findComment-564429 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.