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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.