Problem med script.
Hejsa. Jeg har et script der viser de forskellige ting der er skrevet i min gæstebog. Det virker fint nok. I scriptet er der en checkbox og sætter man flueben i den og trykker på "Slet" skal meddelelsen slettes via et andet script.Men gør jeg det får jeg følgende fejl :
Siden kan ikke vises
blablablabla
HTTP 500 - Intern serverfejl
Internet Explorer
Mine 2 scripts ser sådan ud :
<%
If Not Session("UserID") <> "" THEN
Response.redirect "MEDDELLELSER/ikke_logget_ind.htm"
End If
If request.querystring("action") = "Disconnect" THEN
Session.abandon
Response.redirect "MEDDELLELSER/ikke_logget_ind.htm"
End If
%>
<html>
<head>
<title>Administrer Gæstebog</title>
<meta name="Generator" content="Stone's WebWriter 4">
<link rel="stylesheet" type="text/css" href="../STYLE/style.css">
</head>
<body background="../IMAGES/startile.gif">
<div style="text-align:center">
<table border="0" cellpadding="0" cellspacing="0" width="600" height="10%" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td>
<br><br>
<form action="Administrer_gb_slet.asp" method="post">
<table width="100%" border="1">
<table width="100%" border="1">
<tr align="center">
<td><h1><strong>Slet</td></h1></strong>
<td><h1><strong>Ret</td></h1></strong>
<td><h1><strong>Dato</td></h1></strong>
<td><h1><strong>Navn</td></h1></strong>
<td><h1><strong>Tittel</td></h1></strong>
<td><h1><strong>Indlæg</td></h1></strong>
<td><h1><strong>IP</td></h1></strong>
</tr>
<%
' Databaseforbindelse - husk at angive sti til din database
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("../DATABASER/gaestebog.mdb")
Conn.Open DSN
strSQL = "Select * From Bulletin Order By fldDate Desc"
Set rs = Conn.Execute(strSQL)
%>
<div style="text-align:center">
<font><i>
<%
SQL = "Select count(*) as antal From Bulletin"
Set rsCount = Conn.Execute(SQL)
response.write "Der er i alt " & rsCount("antal") & " indlæg i gæstebogen."
%>
</i></font>
</div>
<br>
<%
do while not rs.EOF
id = rs("UserID")
%>
<tr align="center">
<td><input type="checkbox" name="check" value="<%=rs("UserID")%>"></td>
<td><a href="ret_gb.asp?id=<%=id%>">Ret</a></td>
<td><font><% Response.Write FormatDateTime(rs("fldDate"), vbLongDate) & "</dd>" %></font></td>
<td><font><%=rs("fldName")%></font></td>
<td><font><%=rs("fldTitle")%></font></td>
<td><font><%=rs("fldBody")%></font></td>
<td><font><%=rs("fldIP")%></font></td>
</tr>
<%
rs.MoveNext
loop
rs.close
Conn.Close
Set Conn = Nothing
%>
</table>
<br>
<input type="submit" value="Slet valgte">
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
---------------------------------------------------
<%
If Not Session("UserID") <> "" THEN
Response.redirect "MEDDELLELSER/ikke_logget_ind.htm"
End If
If request.querystring("action") = "Disconnect" THEN
Session.abandon
Response.redirect "MEDDELLELSER/ikke_logget_ind.htm"
End If
%>
<html>
<head>
<title>Administrer Gæstebog - Slet</title>
<meta name="Generator" content="Stone's WebWriter 4">
</head>
<body>
<%
' Databaseforbindelse - husk at angive sti til din database
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("../DATABASER/gaestebog.mdb")
SQL = "DELETE FROM Bulletin WHERE id IN (" & request.form("check") & ")"
set cn = Server.CreateObject("ADODB.Connection")00000
cn.Open DSN
cn.Execute SQL
cn.Close
Set cn = Nothing
Response.Redirect "se_kalender_superadmin_arkiv.asp"
%>
</body>
</html><%
If Not Session("UserID") <> "" THEN
Response.redirect "MEDDELLELSER/ikke_logget_ind.htm"
End If
If request.querystring("action") = "Disconnect" THEN
Session.abandon
Response.redirect "MEDDELLELSER/ikke_logget_ind.htm"
End If
%>
<html>
<head>
<title>Administrer Gæstebog - Slet</title>
<meta name="Generator" content="Stone's WebWriter 4">
</head>
<body>
<%
' Databaseforbindelse - husk at angive sti til din database
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("../DATABASER/gaestebog.mdb")
SQL = "DELETE FROM Bulletin WHERE id IN (" & request.form("check") & ")"
set cn = Server.CreateObject("ADODB.Connection")00000
cn.Open DSN
cn.Execute SQL
cn.Close
Set cn = Nothing
Response.Redirect "se_kalender_superadmin_arkiv.asp"
%>
</body>
</html>
---------------------------------------------------
Er der nogen der har et godt bud på hvad der er galt??