Free web development scripts for the webmasterDevelopment Scripts

 Site Navigation
 o Development Scripts
 o Text Only Edition
 o PHP.net News
 o Tutorials
 o Register an account
 o New entries this week
 o Affiliates/Links
 o Contact Us
 o About us
 o Advanced Search

 Browse Path
 o 3 users online
 o Most users online: 67
 o Home
  o ASP
   o Forms Manipulation
    o Script

 Member Login
User Name
Password

 Standards
Valid XHTML 1.0!
Valid 
CSS!

 Recommended Links
 o PHP Freaks
 o Designer Baby Clothes
 o Advertise Here Make Money
 o Free Wedding Websites
 o Wedding Vendor Directory
 o OxyScripts
 o devnet
 o Open Source Design
 o designplace

Replace single quotes entered in forms (Rated 0)

Description:

This handy function will replace the ' character entered into a web form, with an ascii equivalent. This is essential for posting and retrieval of single quotes to and from a database. This script is just a "snippet" - it indicates how you would incorporate the function with the request.form collection, but isnt a fully working example.

Code starts here


'form variables
dim formVar

'encapsulate form element with quote replacing function
formVar = QuoteReplace(Request.Form("input"))

'function code
Function QuoteReplace(formVar)
QuoteReplace = Replace (formVar, Chr(34),""")
QuoteReplace = Replace (QuoteReplace,"'","'")
End Function


Submitted by Devscripts on 13-02-2003 20:07


Rate This Script

User Contributed Comments

Registered Members login
© Copyright 2003 - Devscripts.net