Check out addslashes() and stripslahes(). Also, when you're populating name fields using values from the database, try using htmlspecialchars(). I found that to be very useful.
Matt |-----Original Message----- |From: Herhuth, Ron [mailto:[EMAIL PROTECTED]] |Sent: Wednesday, February 12, 2003 7:24 AM |To: [EMAIL PROTECTED] |Subject: [PHP-WIN] Apostrophe in login causes error | | | |I have built a typical login form where a user enters their |last name as the user name and the last four digits of their |SSN as their password. The following page checks to see if |the user exists in the database and either allows access or |denies access based on the findings. This has worked fine for |500+ partners...but we have three people whose last name is |O'Conner in the database (I can't change their HR record in |the DB) and the apostrophe in their name is causing the script |to fail. Without changing settings in the ini file is there a |way I can quickly make the script accept the apostrophe in the name? | |Thanks, |Ron | |-- |PHP Windows Mailing List (http://www.php.net/) |To unsubscribe, visit: http://www.php.net/unsub.php | | | -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php