Handling Special Characters with POST

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

Post Reply
crandym
Forum Newbie
Posts: 21
Joined: Thu Jan 29, 2004 8:52 am

Handling Special Characters with POST

Post by crandym »

Currently, I create hidden fields to retain key data. In <TEXTAREA> of form, I allow users to enter text descriptions. These descriptions may contain "trademarks" (i.e., &#8482).

The form action on submit is to call another php file where that file sets variables from the hidden fields via POST. The problem I see is that if any trademarks are entered into the <TEXTAREA>, the first hidden field defined after the <form> tag is not contained in the $HTTP_POST_VARS array. All other hidden variables are there, but the first one defined seems to be omitted. If no trademarks are entered, then the application works fine.

The error message is basically indicating that the hidden field is undefined. Any ideas on how to avoid this problem?

thanks

crandym
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

This should in no way affect POST data. Can we see some code...?

BTW htmlspecialchars() and htmlentities() can handle special characters on the server....

Post some code :wink:
Post Reply