Hvad er galt???
Jeg får denne fejl melding:Microsoft VBScript runtime error \'800a01f4\'
Variable is undefined: \'url\'
/goto.asp, line 3
Kode:
<%
url = Request.QueryString(\"id\")
lastdate = Request.Cookies(\"date\")
lastid = Request.Cookies(\"ID\")
Response.Cookies(\"Date\") = now()
Response.Cookies(\"ID\") = url
Response.Cookies(\"Date\").Expires = dateadd(\"d\",60,now())
if lastdate = \"\" then
lastedate = dateadd(\"d\",-10,now())
End if
Conn_String = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"log/link.mdb\")
set conn = Server.CreateObject(\"ADODB.Connection\")
conn.open Conn_String
Set RS = conn.Execute(\"select * from link2 where ID =\" & url)
ezeRedir = RS(\"URL\").value
ezedate = datediff(\"h\",lastdate, now())
if lastid = url and ezedate < 6 then
Else
hit=cInt(rs(\"Hit\"))+1
Set RS2 = conn.Execute(\"UPDATE link2 SET Hit = \" & hit & \" Where ID =\" & url)
End If
RS.Close
conn.Close
set conn = nothing
Response.Redirect (ezeRedir)
%>