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
Perfidus
Forum Contributor
Posts: 114 Joined: Sun Nov 02, 2003 9:54 pm
Post
by Perfidus » Tue Jan 27, 2004 12:10 pm
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.
xisle
Forum Contributor
Posts: 249 Joined: Wed Jun 25, 2003 1:53 pm
Post
by xisle » Tue Jan 27, 2004 12:49 pm
change your form method to method=POST and you will not need to urlencode() OR urldecode()
Perfidus
Forum Contributor
Posts: 114 Joined: Sun Nov 02, 2003 9:54 pm
Post
by Perfidus » Tue Jan 27, 2004 12:53 pm
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?
xisle
Forum Contributor
Posts: 249 Joined: Wed Jun 25, 2003 1:53 pm
Post
by xisle » Tue Jan 27, 2004 12:57 pm
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..