urldecode problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

urldecode problem

Post by itsmani1 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


this is not working :

Code: Select all

$result = urldecode($result);
echo $result;
this gives me unchanged string

but this is working:

Code: Select all

echo urldecode("TIMESTAMP=2007%2d08%2d22T14%3a00%3a08Z&CORRELATIONID=d9eee6027179f&ACK=Success&". "VERSION=3%2e000000&BUILD=1%2e0006&AVSCODE=X&CVV2MATCH=M&TRANSACTIONID=0BU25574R8136412E&". "AMT=19%2e95&CURRENCYCODE=USD1");
this gives me desired result.

any help?


thanks


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Give us more of a clue... where does $result come from ?

Normally you don't need urldecode as you either:
1) Process the get result or
2) Have the necessary variables already in existance

Try echoing out the $result before the decode. (confirm look from HTML source not just what is on the browser HTML page).
Post Reply