Hi Soren, It is used for display in HTML. I will try your suggestion. Thanks, Pam
> -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] Behalf Of > [EMAIL PROTECTED] > Sent: Monday, August 22, 2005 1:48 PM > To: [email protected] > Subject: Re: [ASP] using quotes in forms > > > When a form is submitted, you have to escape the quotes and > double quotes. > So, try something similar to this: > > FieldValue = Request("FieldName") > FieldValue = Replace(FieldValue, chr(34), chr(34) & chr(34)) > FieldValue = Replace(FieldValue, chr(39), chr(39) & chr(39)) > > When your data is retrieved, you will need to reverse it. > > If the data that is submitted and stored in your database is going to be > used for display somehow in HTML then you can get away with doing > something like: > > FieldValue = Request("FieldName") > FieldValue = Server.HTMLEncode(FieldValue) > > Soren > > > > > > > Pam <[EMAIL PROTECTED]> > Sent by: [email protected] > 08/22/2005 10:36 > Please respond to active-server-pages > > To: [email protected] > cc: > Subject: [ASP] using quotes in forms > > > Hi, > I am using an online form to enter short article data into a MySql > database. > If I use an apostrophe or a quotation mark in the article text that I > enter > into the form field I will almost always (but not always) get an error > message and the data does not get posted. Is there something I can do to > allow quotes and apostrophes to be used in an online form? > > Thanks, > Pam > ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h378fap/M=362335.6886445.7839731.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1124753545/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
