I also would like the answer to this question.. Can you tell I am a newbie?
Trim() takes out the whitespace, but not touch the quotes. Would
addslashes() do the trick? Or is there another format to do it automatically
if a quote is in the information?
Sorry Mark, didn't mean to jump into your question
SJS
----- Original Message -----
From: "Hannes Niedner" <[EMAIL PROTECTED]>
To: "Mark Lo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 9:34 AM
Subject: Re: double quotes and single quotes
> On 7/30/01 7:38 AM, "Mark Lo" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have a problem with double quotes and single quotes in mysql
command,
> > if I let my user
> > input the form data and it contains double quotes, the values cut off at
> > the double quote.
> >
> > How to override the problem ??
> >
> > Thank you
> >
> > Eric Chan
>
> You could escape the the double quotes before sending them to mysql like
so:
>
> $formdata =~ s/"/\"/sg; #this is valid for perl
>
> Hope that helps.
>
> Hannes
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php