hej NG jeg har et lille problem med at den gerne skulle skrive
personens navn på siden når han logger ind på siden, men den
skriver ikke noget...
log in formen
<%
Dim adoCon
Dim strCon
Dim rsCheckUser
Dim strAccessDB
Dim strSQL
Dim strUserName
strUserName = Request.Form("txtUserName")
strAccessDB = "db/pass.mdb"
Set adoCon = Server.CreateObject("ADODB.Connection")
strCon = "DRIVER={Microsoft Access Driver
(*.mdb)};uid=;pwd=letmein; DBQ=" & Server.MapPath(strAccessDB)
adoCon.Open strCon
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE
tblUsers.UserID ='" & replace(strUserName, "'", "''") & "'"
rsCheckUser.Open strSQL, strCon
If NOT rsCheckUser.EOF Then
If (Request.Form("txtUserPass")) = rsCheckUser("Password") Then
Session("blnIsUserGood") = True
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckUser = Nothing
Response.Redirect"/karakterbogen/site/zemvtbagj.asp?name=" &
strUserName
End If
End If
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckUser = Nothing
Session("blnIsUserGood") = False
Response.Redirect"fejl.asp"
%>
siden hvor navnet gerne skulle stå på
<%
If Session("blnIsUserGood") = False or
IsNull(Session("blnIsUserGood")) = True then
Response.Redirect"fejl.asp"
End If
%>
<%
Response.Buffer=False
Response.Expires = 60
Response.ExpiresAbsolute = #1980-01-01#
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "no-cache, must-revalidate"
Response.AddHeader "cache-control", "no-store, must-revalidate"
Response.AddHeader "cache-control","private"
Response.CacheControl = "Private"
Response.AddHeader "Last-Modified", Now & " GMT"
%>
<% Dim strTitle
strTitle="Velkommen"%>
<head>
<meta http-equiv="Content-Language" content="da">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="../style/bg.css">
</head>
<body>
<div class="indhold">
<h1><%Response.Write strTitle%></h1>
</div>
<div align="center">
<center>
<table border="0" width="800" height="10" cellspacing="0"
cellpadding="0">
<tr>
<td width="100%" height="10"><div align="center"><b><img
border="0" src="../billeder/top.jpg" width="800"
height="100"></b></div></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="1" width="800" height="100"
bordercolor="#000000" cellspacing="0" cellpadding="0"
bgcolor="#ffffff">
<tr>
<td width="77%" height="50" valign="top">
<br/>
<div align="center" style="letter-spacing:
10px;"><h1><%=request.querystring("UserID")%></h1></div>
<hr/>
<br />
<br />
</td>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" width="800" height="10" cellspacing="0"
cellpadding="0">
<tr>
<td width="100%" height="10"><img border="0"
src="../billeder/bund.jpg" width="800" height="100"></td>
</tr>
</table>
</center>
</div>
</body>
</html>
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials