Reputation: 4508
I want to enter mysite.com/#test1
in address bar . My site is configed so that index.php will load. And I want to read mysite.com/#test1
in php so php could work with that string getting test1
out of the address. Is that possible ?
This
echo $_SERVER['PHP_SELF'];
gives me only
index.php
While in address bar I have mysite.com/#test1
Upvotes: 0
Views: 287
Reputation: 11106
Any string after a # in a URL is not sent to a server.
How about passing values like mysite.com/index.php?variable=
You can use a $_GET
to get the value.
Upvotes: 0
Reputation: 75629
The part after the hash is not sent to the server, so it is not possible to access it using PHP.
You could read it using Javascript and then submit it to the server.
Upvotes: 5