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






--------------------------------------------------------------------- 
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hn6sk14/M=362329.6886308.7839368.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1124743714/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</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/
 


Reply via email to