Jump to content

If query string - do something


Stefan83

Recommended Posts

Hi - I'm trying to echo different results if the current URL contains a certain query string. Ie if the URL contains ?fromAPP=1 OR ?fromQB=1 DO SOMETHING. I can't get the following to work. Can anyone help? Thanks

$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (false !== strpos($url,'?fromApp=1,?fromQB=1')) {
 // do something
}

else {
}
Link to comment
https://forums.phpfreaks.com/topic/283202-if-query-string-do-something/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.