Re: using % and £ in strings

From: Date: Tue, 10 Jun 2003 15:26:54 +0000
Subject: Re: using % and £ in strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150926@lists.php.net to get a copy of this message
Try: $string=stripslashes($string); // only if magic_quotes are on ini_alter("magic_quotes_sybase",1); $string=addslashes($string); bob pilly wrote:
Hello I am trying to let a user enter notes about an appointment but are having errors when trying to write their input to a database. The users input goes into string $appnotes $query2="update appresult set appresult = '$appointmentresult',product='$product',fees='0',appnotes='$appnotes' where refno ='$refno'"; This gives the following error if the user inputs special characters like % & or £. Warning: Sybase message: Unclosed quotation mark before the character string 'To p'. (severity 15) in updaterecord.php on line 81 Any help or pointing me to some good documentation on this would be greatly appreciated! __________________________________________________ Yahoo! Plus - For a better Internet experience http://uk.promotions.yahoo.com/yplus/yoffer.html


« previous php.general (#150926) next »