In ASP, is there a way to replace characters. What I mean by this is that I have a form in which users can submit their comments. Now what they do is they at times even use the singl-quotation (also known as an apostrophe) in their messages. Now when the message is being added to the database, that single-quotation causes an error and the user gets frustrated not knowing what to do.
I have used the following code:
message=request.QueryString("message")
set con=server.createobject("ADODB.connection")
con.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("database.mdb")
post="INSERT into MessagesTable(Message,MsgBy)values('" & message & "','" & msgby & "')"
set post=con.execute(post)
Also, if this can be done, I suppose many thnigs like this can be done -- making text appear in bold and italics should be functioning just like it functions in these forums. I hope I have made myself clear!
Thanks,
Hassaan
I have used the following code:
message=request.QueryString("message")
set con=server.createobject("ADODB.connection")
con.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("database.mdb")
post="INSERT into MessagesTable(Message,MsgBy)values('" & message & "','" & msgby & "')"
set post=con.execute(post)
Also, if this can be done, I suppose many thnigs like this can be done -- making text appear in bold and italics should be functioning just like it functions in these forums. I hope I have made myself clear!
Thanks,
Hassaan