escaped characters problem

From: Date: Mon, 19 Jun 2000 12:21:10 +0000
Subject: escaped characters problem
Groups: php.db 
Request: Send a blank email to php-db+get-467@lists.php.net to get a copy of this message
I have a written a simple news input interface for our admin staff to add articles to our website. When they have an article name containing a single quote, the string is cut off at that point on generation of the sql string. example --------- original typed entry in description field: Lez's quote test echoed $description value: Lez\'s quote test $strsql = "INSERT INTO news (description) VALUES ( '$description' )"; echoed $strsql value: Lez\ Can anyone tell me what is going on and how I can fix it? Thanks in advance Lez

« previous php.db (#467) next »