Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2014
    Posts
    74
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Escaping decimals in a URL variable

    Does anyone know how I can escape a decimal in a URL variable?

    I.E: example.com/?value=100.00

    echo $_GET['value']; returns '', when I am wanting it to return '100.00'.

    I tried using quotes around 100.00 in the URL, but it didn't work.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,721
    Thanks
    25
    Thanked 662 Times in 661 Posts
    <?php
    header('Location: test.php/?value=100.00');
    ?>

    You are sending to example.com it should be to a php file.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #3
    Regular Coder
    Join Date
    Oct 2004
    Posts
    377
    Thanks
    0
    Thanked 26 Times in 26 Posts
    You do not need to escape decimals. What does print_r($_GET); output?

    You are sending to example.com it should be to a php file.
    It could be an index.php file.

  • #4
    New Coder
    Join Date
    Jan 2014
    Posts
    74
    Thanks
    11
    Thanked 0 Times in 0 Posts
    My PHP is configured to parse PHP in .html files.

  • #5
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,444
    Thanks
    11
    Thanked 310 Times in 309 Posts
    This is one weird thread...

    Do the print_r($_GET); that schleppel suggested, and let us know what it outputs.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •