wierd slash
| From: | Don | Date: | Sun, 21 Jan 2007 04:50:48 +0000 |
| Subject: | wierd slash | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-247480@lists.php.net to get a copy of this message | ||
I have a line of code that validates form info for some POST vars, but not
others.
if (!ereg("^[A-Za-z' -]{1,50}$",$_POST[$field]) )
when I put O'Toole in the form to test, my script kicks the page back (I
thought this entry would be OK)
but moreover, when it redisplays the form and populates the new form with
the entries previously entered, O'Toole becomes O\
when I put similar entries into fields that are not run through this line,
they go to the DB as typed.
Any advice?
Thanks again
Don