Re: No result - need advice.

From: Date: Wed, 21 Feb 2001 10:16:05 +0000
Subject: Re: No result - need advice.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40924@lists.php.net to get a copy of this message
"Kenneth R Zink II" <Hellcat1@EV1.Net> wrote in message news:025901c09b68$edd3d200$2047ced8@telescan.com... > I'm having problem with a php script. I get a valid insert statment echoed to the screen but I don't get a result from it. If I cut and > paste into the SQL query box in PHPMyadmin, it insert fine, but it will not do it from the script. > sql = INSERT INTO memberstest VALUES ('', 'Kenneth R Zink II', > '5095094', 'Texas', 'yes', '02.20.01', 'yes', 'Hellcat1@S- > Series.Org', > 'http://www.s-series.org/htm/firestorm/firestorm.htm', '1985', 'Chevrolet', 'Blazer', '', '0.000', '0.000', '0.000', '', > '3.4L', '', '', '', '2WD', '2 > Door', '', '', '', '', 'Spring', '14 December 1976', 'Red', 'See my project page for details.', 'See my project > page for details.', 'See my project page for details.', 'See my project page for details.', 'See my project page for details.', 'See my > project page for details.', 'this is a test. let\'s see if this goes through.', '', '1gtcs14r3h8515786') The problem is in this last bit here, where you've entered "this is a test. let's see if this goes through." Despite PHP autmotacially putting in the backslash for you, it won't work. MySQL sees the ' as being the end of that variable. Many of the clients seem to be able to encode this by themselves, but PHP doesn't. So you need to run urlencode() over this kind of stuff. -- Rick Hodger

« previous php.general (#40924) next »