hey

im having some problems with url encoding

when i encode the string it is read fine to the page that it is sent to through the url, but when i try echoing it into a form test field, it cuts off everything after the first space. any ideas how i could fix this? thanks

    what is the code you are using in the script to encode it, then whats the code to decode it and show it in the text box?

      using either rawurlencode or urlencode to encode it

      either way when i echo it outsite the field, it shows up correctly

      when i echo it as the value of the field, it shows up missing everything after the first space
      Name: <input type=text name='name' value = <?echo $name?>></td>

        problem is here
        <input type=text name='name' value = <?echo $name?>></td>

        there is no quote around the value so if it has multiple words it ends up like this

        <input type=text name='name' value = this is a string></td>

        the browser will see value = this, and since its not enclosed in quotes, it treats is a string as separate attributes of the tag.

        simply use
        <input type=text name='name' value='<?php echo $name?>'>

          Write a Reply...