-1

I am trying to get parameter values from the URL.

e.g. http://www.mywebsite.com/?id=345#gid=532&sid=567

I want to get gid and sid value from the url, but $_GET['sid'] and $_GET['gid'] is not working.

Please help me! How to get these # tag values in php?

MrTux
  • 32,350
  • 30
  • 109
  • 146
Rocky Sena
  • 481
  • 1
  • 5
  • 15

1 Answers1

3

Th part of an URI after the # is called "fragment" and is by definition only available/processed on client side (see https://en.wikipedia.org/wiki/Fragment_identifier).

On the client side, this can be accessed using JavaScript with window.location.hash. When you send it to the server somehow, you can use the parse_url function.

Community
  • 1
  • 1
MrTux
  • 32,350
  • 30
  • 109
  • 146