erezwe
erezwe

Reputation: 61

GET URL parameter in PHP %24 ($) with a number after it won't echo correctly %241%2C995.00

I'm using $_GET to show some parameters from my URL on page. Everything works fine but one parameter - totalprice. For example in this URL:

https://justpaintmyhouse.com/your-are-all-set/?startdate=04/30/2014&fname=First+Name&email=something%40gmail.com&totalprice=%241%2C995.00&projectzip=999999&projectstate=Georgia&projectcity=CIty&projectst=123+Street+Rd

On the page I use: echo $_GET['totalprice']

And it should be $1,995.00 but all I get is ,995.00

Is there another way to get the parameter it will recognize there is a $ sign and a number after it?

Upvotes: 0

Views: 189

Answers (2)

erezwe
erezwe

Reputation: 61

It seem to be an issue with the WP plugin I used to put PHP inside the page (Insert PHP). I switched to another one - (URL Params) and it seem to work fine. Thanks

Upvotes: 2

Michel
Michel

Reputation: 4157

You could use

rawurldecode($_GET['totalprice']);

Upvotes: 0

Related Questions