RE: [PHP-WIN] Apostrophe in login causes error

From: Date: Wed, 12 Feb 2003 17:28:17 +0000
Subject: RE: [PHP-WIN] Apostrophe in login causes error
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-18490@lists.php.net to get a copy of this message
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:Ron.Herhuth@tatumcfo.com] |Sent: Wednesday, February 12, 2003 7:24 AM |To: php-windows@lists.php.net |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 | | |

« previous php.windows (#18490) next »