kapishi Posted March 6, 2006 Share Posted March 6, 2006 Hello,I want to read the browser's url in php and parse it. for e.g: [a href=\"http://www.abc.com?val=ab\" target=\"_blank\"]http://www.abc.com?val=ab[/a]I want to check if 'val=' exists in the url(of browser). Please advice.Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/4242-how-to-read-the-browsers-url-in-php/ Share on other sites More sharing options...
obsidian Posted March 6, 2006 Share Posted March 6, 2006 welcome to the forum! hope you find lots of great advice here.to see if val= occurs in the query string of your current URL, simply use the isset() function:[code]if (isset($_GET['val'])) // it is in the urlelse // it's not in the url[/code] Quote Link to comment https://forums.phpfreaks.com/topic/4242-how-to-read-the-browsers-url-in-php/#findComment-14731 Share on other sites More sharing options...
kapishi Posted March 6, 2006 Author Share Posted March 6, 2006 It works! Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/4242-how-to-read-the-browsers-url-in-php/#findComment-14737 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.