Jump to content

Can php find #items on address bar?


fantic

Recommended Posts

You can retrieve the whole URL and parse it for the # sign, then take whatever comes after that.

 

But I'm not going to write that code.

 

This should get you pointed in the right direction:

 

http://www.webcheatsheet.com/PHP/get_current_page_url.php

 

It will tell you how to get the page URL. Then you can use the PHP string functions to extract the part of the URL that you want.

that page suggests that the #value is kept in $_SERVER['REQUEST_URI'] if you go to a page with phpinfo() say it was called ini.php and you go to ini.php#testStringtoSearch

and search for testStringtoSearch you can't find it because it is never sent to the server.

 

Scot.

Archived

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

×
×
  • Create New...

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.