"Kenneth R Zink II" <[EMAIL PROTECTED]> wrote in message
025901c09b68$edd3d200$[EMAIL PROTECTED]">news:025901c09b68$edd3d200$[EMAIL PROTECTED]...
> 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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]