Hello,

My question is about an HTML form using "POST" method.

I'm using a simple HTML form, from which I get back my variables with this code :
sLastName = Request.Form.Item("LastName")
This work correctly.

But when the user fill the blank field with a string containing " ' ", I only get the first part of the field, before the '.
I've tried to use the following code instead :

sLastName = Replace(Request.Form.Item("LastName"),"'","''")

But this doesn't work anymore.

Any ideas on how to get the full field with the " ' " ?

Regards.

Code:

Dim sLastName
sLastName = Request.Form("LastName")
sLastName = Replace(sLastName, "'", "''")

sLastName = Replace(sLastName, "'", "´")

You will get I'm rather than I"m

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.