Page 1 of 1

Urldecode

Posted: Tue Jan 27, 2004 12:10 pm
by Perfidus
I have a list in a form which is filled form a database.
Some items in the list have white spaces, this is an option example:

"La Manga del Mar Menor"

When I submit the form, what arrives to processing PHP is only "La", the rest is missing on the way.
I guess I have to use the urlencode in the form:

<option value=<? echo (urlencode($opciones)); ?>>

But I do not know exactly how to decode it in the next page, even though I have been looking at the example in manual.

Posted: Tue Jan 27, 2004 12:49 pm
by xisle
change your form method to method=POST and you will not need to urlencode() OR urldecode()

Posted: Tue Jan 27, 2004 12:53 pm
by Perfidus
OK, then I guess I have a bigger problem than I thought, because all my forms use POST, not GET.
So, where is the matter now?

Posted: Tue Jan 27, 2004 12:57 pm
by xisle
hmm try calling phpinfo() when you make the post and take a look at the post vars. Are they being chopped at post or when you call them later..