List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:May 6 1999 5:09pm
Subject:Re: Problem with Quotes!!
View as plain text  
Douglas Brantz wrote:
> I have web based course proposal forms for a college using mysql and
> perl and the biggest problem I keep running into is the use of special
> characters.   This might be a question more suited for a perl listserve,
> but I thought someone on this listserve is bound to have the answer.
> The dreaded "The document contains no data" error when a user uses "" in
> the form.  How can I handle this, besides posting in bold on the form
> "Please don't use "quotes" in this form."  I think the problem occurs
> when someone describes measurements such as 7"x8", or when they quote a
> passage.  How can I let them use quotes and then allow it to be stored
> in mysql so they can review it, edit it and then print it out.
> Thanks for you help in advance.
> Douglas
> Computer Consultant

$text_field =~ s/\"/\\\"/g;

That should escape the quotes and you will be able to
insert them into the text field in the database.

Sasha Pachev (home) (work)
Problem with Quotes!!Douglas Brantz6 May
  • Re: Problem with Quotes!!Fraser MacKenzie6 May
  • Re: Problem with Quotes!!Sasha Pachev6 May