php help probably basic (used stripslashes but probably not the right way to do it)

From: Date: Tue, 11 Sep 2001 04:50:46 +0000
Subject: php help probably basic (used stripslashes but probably not the right way to do it)
Groups: php.general 
Request: Send a blank email to php-general+get-66847@lists.php.net to get a copy of this message
I am having the following problem. I have a database that is setup as follows CREATE TABLE test ( id tinyint(4) NOT NULL auto_increment, text text NOT NULL , PRIMARY KEY (id) ) TYPE=MyISAM; I have a page after a form that confirms all data to be entered the html is as follows text=\"test \'ve\" id=1 <form action=./commitcard.php > <input type=hidden name=text value="\"test I\'ve\""> <input type=hidden name=id value="1"> <input type=submit name=submit value="Commit to database!"> </form> however in the next page I am doing a print of the insert statement for testing and all I get is the following insert into test (id,text) values ('1','\') I have tried the following $test = stripslashes($test); but it just gets worse any ideas would be helpful I am using php 4.0.6, apache 1.3.20, mysql 3.23.42, and Linux kernel 2.4.3 Lance Rochelle lrochelle@stny.rr.com http://ulands.idlegames.com (607) 775-2681 ------------------------------------------- Being a Systems Administrator is like hitting yourself in the bead with a brick. After a while you don't feel the pain. --------------------------------------------

« previous php.general (#66847) next »