Validating Form String Data

Results 1 to 4 of 4

Thread: Validating Form String Data

  1. #1
    Join Date
    Dec 1969

    Default Validating Form String Data

    I have text coming from a form which contains apostrophes. I store this data in a variable, then add it to a database. Because of the apostrophe, there is a problem executing that line of SQL code. For example:<BR><BR>&#039;" & text & "&#039;<BR><BR>is not executed properly because an apostropohe appears inside the conversion syntax and throws off the computer. Is there a way to correct this?

  2. #2
    Join Date
    Dec 1969

    Default RE: Validating Form String Data

    I think u need to double up the &#039;<BR><BR>replace(variable,"&#039;","&#039;&#0 39;")<BR><BR>

  3. #3
    naik Guest

    Default Replace (vbscript)

    Try <BR><BR>Replace of vbscript

  4. #4
    Gumby Guest

    Default RE: Replace (vbscript)

    You will have to do a replace using VBScript. Replace the apostrophe with something like a ~ or somethig then use the variable. If you want to display it later on a page then you can just do another replace and change the ~ back to an apostrophe.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts