• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

adding 25 instead of just % sign

I have a problem,
I am using GET to get some values passed to this file on the server, but then i want to redirect the user to a new URL but it somehow adds "25" on the end of the "%" sign which is giving me a wrong URL.
Below is the code i am using
$userid = $_GET["userId"]; 


<form action="http://www.website.com/index.aspx" method="get">
     <input name="userId" type="hidden" value="<?php echo $userid?>"/> 
      <input name="R" type="hidden" value="Q"/> 
       <input name="earn" type="hidden" value="sdKa6Ro9vbdXJgr7qXDJ9w%3d%3d"/> 

  <input type="image" title="Next" id="cmdNext" name="Next" /></td></tr>

Open in new window

But it shows up as:

as you can see it add "25" after "%" and then appends "&Next.x=32&Next.y=23" for some reason...
Can you please help me out ? i need this issue solved asap..

  • 4
  • 3
1 Solution
Ray PaseurCommented:
I think you have a URL encoding collision
Ray PaseurCommented:
Please tell us how you arrived at this input value:

<input name="earn" type="hidden" value="sdKa6Ro9vbdXJgr7qXDJ9w%3d%3d"/>

... And tell us what you expected to receive in the "Next" position of the GET array?

Thanks, ~Ray
chiboy888Author Commented:
thanks ray,
i had to replace the %3d with = sign and it does the conversion back to %3d, however it converts to %3D...does uppercase letters matter in URL's?
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

chiboy888Author Commented:
Hi Ray,
I change the input value to be

 <input name="earn" type="hidden" value="sdKa6Ro9vbdXJgr7qXDJ9w=="/>
which converts to:


however it still appends the extra bit on the end "&Next.x=58&Next.y=27"

which i don't know why...the Final URL should look like this:

Ray PaseurCommented:
The "&Next.x=58&Next.y=27" part is because the submit button is an image

input type="image"

If you make this input type="submit" it will not transmit the image coordinates.
chiboy888Author Commented:
cool mystery solved, as always, fast responses from you Ray,
Ray PaseurCommented:
Thanks for the points! ~Ray

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now