Forum Moderators: open
page 1
fill in form > submit form to page 2
page 2
grab form values, set them to variables , build a sql UPDATE statement and update the database, but i'm having problems when the user fils in a form field and uses single quotes,
eg yadda yadda yadda' yadda etc etc
this mucks up the sql statement, now this is presumably quite a common problem with a well known solution, except the solution isn't well known to me... any ideas? thnx
var1 = replace(request.form("var1"),"'","''")
var2 = replace(request.form("var2"),"'","''")
etc
.
.
.
that will replace all occurences of ' with '' in the string and your sql statements will work fine.