bascially i create a form to pass value to another form to process n update to mysql. the code work fine if strFname n strLname is not variable, but when it try to pass it as variable i encounter errors.
i also tried
set sql = objConn.execute("INSERT person(fname, lname)VALUES([COLOR=Red] " & strFname & “,” & strLname & “[COLOR=Black])[/COLOR][/COLOR]”)
but it still have error…
anyone know how to solve this pb. tks.
<%@ language=vbscript %>
<% option explicit %>
<%
dim sql, conn, objConn, strFname, strLname
strFname = request(“fname”)
strLname = request(“lname”)
set objConn = server.createObject(“ADODB.connection”)
conn = “DRIVER={MySQL ODBC 3.51 Driver}; server=localhost; database=hate; UID=admin; password=pass; option=3”
objConn.open(conn)
set sql = objConn.execute(“INSERT person(fname, lname)VALUES([COLOR=Red]strFname, strLname[COLOR=Black])[/COLOR][/COLOR]”)
%>