I'm working on a functionality that requires the php script to know the html anchor name a page has been loaded with. I'm finding such of dearth of information on the topic I'm not even sure if I'm using the right nomenclature.
Basically I would have someone landing on a page using an internal anchor. Something like
www.mypage.com/index.php#my_place_in_page
or www.mypage.com/index.php?param=42#my_place_in_page
.
In this case my goal would be to get my_place_in_page
into my script somehow.
I've gone through the whole list of things that $_SERVER can get me, and it doesn't seem to be there. $_SERVER['REQUEST_URI']
will return www.mypage.com/index.php
or www.mypage.com/index.php?param=42
, but always cuts off after the hash.
Is there any way to get the anchor name? Or is the reason I can't find any references to this because it's just not something that php does.
Thanks for help or insight that anyone can offer.