Jump to content

Archived

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

kapishi

How to read the browser's url in php

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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 url
else
  // it's not in the url
[/code]

Share this post


Link to post
Share on other sites

×

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.