Jump to content

$_Get['']


Solar

Recommended Posts

I understand the $_GET[''] function.. but I have ran into an error.

Lets say my URL is localhost.php/test.php?say=#hello

The $_GET[''] function will only take the print after the equal and before the pound sign. - Which is blank

 

My question is... What function should I use to parse after the # sign?

 

Thanks,

Steven

Link to comment
Share on other sites

I have decided to take a different approach to this method. After researching; everyone's reply is the same response I recieved when reviewing the PHP.net website.

Thank-you for your time, if the method was possible, it would have saved me a ton of time. But in the long run, the method I expected is not proper.

 

Thanks again,

Solar

Link to comment
Share on other sites

Just to be clear: This method works perfectly well for every non-reserved character. Characters like @, #, &, ?, /, and = are reserved for use as URL delimiters, which is why they need to be escaped. All you'd have to do is change #hello to $hello (or something else) and it would have started working. Unless you're relying on the specific behavior of jump-to-tag while also trying to get that tag in a PHP script, in which case you should know that jumping to tags on the same page never refreshes the page, so PHP never happens.

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.