How can I get a variable of a hash in php.
I have a variable on page like this
catalog.php#album=2song=1
How can i get the album and song values and put them into PHP variables?
You can't get this value with PHP because PHP processes things server-side, and the hash in the URL is client-side only and never gets sent to the server. JavaScript can get the hash though, using window.location.hash (and optionally call on a PHP script including this information, or add the data to the DOM).
window.location.hash
1.4m articles
1.4m replys
5 comments
57.0k users