Re: Unique Format

From: Date: Wed, 22 Oct 2003 17:27:09 +0000
Subject: Re: Unique Format
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31271@lists.php.net to get a copy of this message
Use htmlentities() or htmlspecialchars()... ---John Holmes... ----- Original Message ----- From: "Tonya" <php@asksummer.com> To: <php-db@lists.php.net> Sent: Wednesday, October 22, 2003 1:07 PM Subject: [PHP-DB] Unique Format PHP 4.3.3 and MYSQL I am constructing a site for gamers that has a member registration form with field 'Game Handle'. Gamers are funny in that their game alias can include just about any character you can imagine. Setting up an ereg for this would be quite difficult. However, I *do* want to protect my site from any malicious data entry. I have tried to strip_tags this field, but many gamers put their team tags in their handle or use < and > characters within the name, so an input like "<team9>Jester" results in the team being taken out and only Jester being left. While that is not so bad, if the user inputs a name like G<o>D, it changes the name signficantly. Anyone have any suggestions on how I can format the game handle variable so that it allows these characters while not leaving my site subject to malicious input? Thanks!

« previous php.db (#31271) next »