RE: [PHP-DB] Qoute problem

From: Date: Wed, 14 Feb 2001 17:10:14 +0000
Subject: RE: [PHP-DB] Qoute problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6624@lists.php.net to get a copy of this message
Ok here is the problem. At the preview stage.. I lets say I do this: <?php $describe = stripslashes($describe);?> <input type=hidden name=describe value="<?php print $describe?>"> Then.. when I load the next script to update the database.. I echo out my SQL statement. UPDATE news SET release_date='2000-11-01', title='NSFAwards $2.9 Million for Web100 Project ', description='The National Science Foundation has awarded $2.9 million to the Web100 Project, a research effort aimed at bringing data transmission rates of 100 megabits per second to the desktops of researchers. The three-year grant, effective September 15, provides funding to develop software that can automatically ', contact='Sean Fulton Pittsburgh Supercomputing Center (412) 268-4960 sfulton@psc.edu ', content='', type='local' WHERE news_id= Now.. ignore the problem at the end of the SQL statement (thats because of the qoute problem). But.. you will notice that my description is cut off at automatically. This is what it should look like: The National Science Foundation has awarded $2.9 million to the Web100 Project, a research effort aimed at bringing data transmission rates of 100 megabits per second to the desktops of researchers. The three-year grant, effective September 15, provides funding to develop software that can automatically "tune" computer operating systems to fully exploit available network bandwidth. (Of course the slashes should be there in the SQL script.. but they arent.) Any ideas? Or want me to try to explain this again. -Tanya On Wed, 14 Feb 2001, Ben Cairns wrote: > Hi Tanya, > Hope this helps > > you need to stripslashes(); > > ie. > > if your quote is in $foo then: > stripslashes($foo); > > > -- Ben Cairns - Head Of Technical Operations > intasept.COM > Tel: 01332 365333 > Fax: 01332 346010 > E-Mail: BenC@intasept.com > Web: http://www.intasept.com > > "MAKING sense of > the INFORMATION > TECHNOLOGY age > @ WORK......" >

« previous php.db (#6624) next »