I was wondering if anyone had a minute to check out the following code and tell me what I am doing wrong:
----------------------------------------------------------
<%
f_name = Request.Cookies("First_Name"
l_name = Request.Cookies("Last_Name"
ss = Request.Cookies("SSN"
eml = Request.Cookies("email"
comp = Request.Cookies("CO"
loc = Request.Cookies("loc"
tot = Request.Cookies("total"
cst = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
cst = cst & server.mappath("../../db/fpdb/boyderstestresults.mdb"
set conn = Server.CreateObject("ADODB.Connection"
conn.open cst
sql = "INSERT INTO results(fname) VALUES(f_name)"
conn.execute(sql)
conn.close
cst = 0
%>
-----------------------------------------------------
The code works if I put quotes around f_name, 'f_name'
but then it enters the word f_name into my table, not the value of f_name retrieved from the cookie value.
Sincere thanks
----------------------------------------------------------
<%
f_name = Request.Cookies("First_Name"
l_name = Request.Cookies("Last_Name"
ss = Request.Cookies("SSN"
eml = Request.Cookies("email"
comp = Request.Cookies("CO"
loc = Request.Cookies("loc"
tot = Request.Cookies("total"
cst = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
cst = cst & server.mappath("../../db/fpdb/boyderstestresults.mdb"
set conn = Server.CreateObject("ADODB.Connection"
conn.open cst
sql = "INSERT INTO results(fname) VALUES(f_name)"
conn.execute(sql)
conn.close
cst = 0
%>
-----------------------------------------------------
The code works if I put quotes around f_name, 'f_name'
but then it enters the word f_name into my table, not the value of f_name retrieved from the cookie value.
Sincere thanks