hi im trying to get variables into a database,
can anyone see anything obviousley wrong with this code?
i would be very greatful for any help
i think the problem is in the "insert" lines thanks again
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/lostat.asp" -->
<%
var Command1 = Server.CreateObject("ADODB.Command"
Command1.ActiveConnection = MM_lostat_STRING;
Command1.CommandText = "INSERT INTO tblStats (Recorded, RemoteAddress, HttpReferer, HttpUserAgent, WebPage) VALUES ('" & Request("date" & "', '" & Request("REMOTE_ADDR" & "', '" & Request("HTTP_REFERER" & "', '" & Request("HTTP_USER_AGENT" & "', '" & Request("URL" & "') ";
Command1.CommandType = 1;
Command1.CommandTimeout = 0;
Command1.Prepared = true;
Command1.Execute();
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoDateTime(str, nNamedFormat, nLCID)
dim strRet
dim nOldLCID
strRet = str
If (nLCID > -1) Then
oldLCID = Session.LCID
End If
On Error Resume Next
If (nLCID > -1) Then
Session.LCID = nLCID
End If
If ((nLCID < 0) Or (Session.LCID = nLCID)) Then
strRet = FormatDateTime(str, nNamedFormat)
End If
If (nLCID > -1) Then
Session.LCID = oldLCID
End If
DoDateTime = strRet
End Function
</SCRIPT>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<input type="hidden" name="12" value="<%= DoDateTime( Request("date" , 2, 2057) %>">
<input type="hidden" name="13" value="<%= Request("REMOTE_ADDR" %>">
<input type="hidden" name="14" value="<%= Request("HTTP_REFERER" %>">
<input type="hidden" name="15" value="<%= Request("HTTP_USER_AGENT" %>">
<input type="hidden" name="16" value="<%= Request("URL" %>">
test</p>
<p> </p>
</body>
</html>
can anyone see anything obviousley wrong with this code?
i would be very greatful for any help
i think the problem is in the "insert" lines thanks again
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/lostat.asp" -->
<%
var Command1 = Server.CreateObject("ADODB.Command"
Command1.ActiveConnection = MM_lostat_STRING;
Command1.CommandText = "INSERT INTO tblStats (Recorded, RemoteAddress, HttpReferer, HttpUserAgent, WebPage) VALUES ('" & Request("date" & "', '" & Request("REMOTE_ADDR" & "', '" & Request("HTTP_REFERER" & "', '" & Request("HTTP_USER_AGENT" & "', '" & Request("URL" & "') ";
Command1.CommandType = 1;
Command1.CommandTimeout = 0;
Command1.Prepared = true;
Command1.Execute();
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoDateTime(str, nNamedFormat, nLCID)
dim strRet
dim nOldLCID
strRet = str
If (nLCID > -1) Then
oldLCID = Session.LCID
End If
On Error Resume Next
If (nLCID > -1) Then
Session.LCID = nLCID
End If
If ((nLCID < 0) Or (Session.LCID = nLCID)) Then
strRet = FormatDateTime(str, nNamedFormat)
End If
If (nLCID > -1) Then
Session.LCID = oldLCID
End If
DoDateTime = strRet
End Function
</SCRIPT>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<input type="hidden" name="12" value="<%= DoDateTime( Request("date" , 2, 2057) %>">
<input type="hidden" name="13" value="<%= Request("REMOTE_ADDR" %>">
<input type="hidden" name="14" value="<%= Request("HTTP_REFERER" %>">
<input type="hidden" name="15" value="<%= Request("HTTP_USER_AGENT" %>">
<input type="hidden" name="16" value="<%= Request("URL" %>">
test</p>
<p> </p>
</body>
</html>