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

From: Date: Wed, 12 Feb 2003 13:24:27 +0000
Subject: RE: [PHP-WIN] Apostrophe in login causes error
Groups: php.windows 
Request: Send a blank email to php-windows+get-18483@lists.php.net to get a copy of this message
Try using the addslashes function. Magic Quotes may need to be turned on in the php.ini file, but I'm not sure. $newloginname=addslashes($loginname); This should allow for the apostrophe in the variable. -----Original Message----- From: Herhuth, Ron [mailto:Ron.Herhuth@tatumcfo.com] Sent: Wednesday, February 12, 2003 8: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 (#18483) next »