Hello i collecting data from a user for two diffent tables in a data base and i need a unique ID so i can match the data lata...
But when i try to add the Session Variable to the table it adds it over and over ...
Any ideas on how to fix this thanks
<%@ language="JScript" %>
<!-- #include file="adojavas.inc" -->
<html>
<head>
<title>Nutritional answers</title>
</head>
<body>
<%
var connect = Server.CreateObject("ADODB.Connection");
var recordSet = Server.CreateObject("ADODB.RecordSet");
connect.Open("DSN=excuse");
recordSet.Open("select * from Details",connect, adOpenKeyset,adLockOptimistic);
var FN = Request.Form("fn")
var LN = Request.Form("ln")
var A1 = Request.Form("A1")
var A2 = Request.Form("A2")
var CIT = Request.Form("cit")
var STA = Request.Form("sta")
var ZIP = Request.Form("zip")
var PN = Request.Form("pn")
var EM = Request.Form("em")
Session("USER") = Request.Form("user").Item;
var PASS = Request.Form("pass")
recordSet.AddNew();
recordSet("FirstName") = FN
recordSet("LastName") = LN
recordSet("Address1") = A1
recordSet("Address2") = A2
recordSet("City") = CIT
recordSet("State") = STA
recordSet("Zip") = ZIP
recordSet("PhoneNumber") = PN
recordSet("Email") = EM
recordSet("USER") = Session("USER")
recordSet("PASS") = PASS
recordSet.Update();
connect.Close();
connect = null;
Response.Redirect("succesfull.asp")
%>
</body>
</html>
But when i try to add the Session Variable to the table it adds it over and over ...
Any ideas on how to fix this thanks
<%@ language="JScript" %>
<!-- #include file="adojavas.inc" -->
<html>
<head>
<title>Nutritional answers</title>
</head>
<body>
<%
var connect = Server.CreateObject("ADODB.Connection");
var recordSet = Server.CreateObject("ADODB.RecordSet");
connect.Open("DSN=excuse");
recordSet.Open("select * from Details",connect, adOpenKeyset,adLockOptimistic);
var FN = Request.Form("fn")
var LN = Request.Form("ln")
var A1 = Request.Form("A1")
var A2 = Request.Form("A2")
var CIT = Request.Form("cit")
var STA = Request.Form("sta")
var ZIP = Request.Form("zip")
var PN = Request.Form("pn")
var EM = Request.Form("em")
Session("USER") = Request.Form("user").Item;
var PASS = Request.Form("pass")
recordSet.AddNew();
recordSet("FirstName") = FN
recordSet("LastName") = LN
recordSet("Address1") = A1
recordSet("Address2") = A2
recordSet("City") = CIT
recordSet("State") = STA
recordSet("Zip") = ZIP
recordSet("PhoneNumber") = PN
recordSet("Email") = EM
recordSet("USER") = Session("USER")
recordSet("PASS") = PASS
recordSet.Update();
connect.Close();
connect = null;
Response.Redirect("succesfull.asp")
%>
</body>
</html>