Irfan
Irfan

Reputation: 7059

why $_GET value is different than URL

I have a url like this

http://example.com/folder/component/mycom/?insid=7&test=685286640293e700bc9440cafb587290

I need to get value of test. When I echo $_GET['test'] it returns 685286640293e700bc9440cafb587290?url=component/mycom/ . It is happening for last variable of url.I dont know why is this so? Thanks

Upvotes: 1

Views: 110

Answers (1)

Fluffeh
Fluffeh

Reputation: 33512

Test isn't being sent in the $_GET that you displayed?

You have : insid=7 and token=685286640293e700bc9440cafb587290 with a malformed & between them that is the HTML code for & rather than the & itself.

Your URL at the moment is this:

http://example.com/folder/component/mycom/?insid=7&test=685286640293e700bc9440cafb587290

If you change it to

http://example.com/folder/component/mycom/?insid=7&test=685286640293e700bc9440cafb587290

I would be willing to bet you will get your code working :)

Upvotes: 4

Related Questions