Søgning, hurtigt svar plz!
Står og skal aflevere projekt om 2 timer, men har et lille problem... nogle som kan finde en fejl i dette:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<%
Option Explicit
Dim rs, Conn, DSN, strSQL, connn
%>
<!--#include file="conn.inc"-->
<%
Response.Buffer = True
Response.expires = 0
If Request.form("sog") = "Matematik" then
strSQL = "SELECT * FROM Artikler Where Fag = 'Matematik' ORDER BY dato DESC"
Set rs = Conn.Execute(strSQL)
end if
If Request.form("sog") = "Fysik" then
strSQL = "SELECT * FROM Artikler Where Fag = 'Fysik' ORDER BY dato DESC"
Set rs = Conn.Execute(strSQL)
end if
If Request.form("sog") = "Alt" then
strSQL = "SELECT * FROM Artikler ORDER BY dato DESC"
Set rs = Conn.Execute(strSQL)
end if
%>
<html>
<head>
<link href="main.css" type=text/css rel=stylesheet>
<title>Artikler</title>
<META NAME="Generator" CONTENT="Stone's WebWriter 3.5">
</head>
<body leftmargin="0" topmargin="0">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td width="100%" class="hm" style="border-bottom: 1 solid #000000">Artikler:</td></tr>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<BR>
<form method="post" name="Sog" action="artikler.asp?site=sog">
<select name="Sog" size="1">
<option value="Alt">Alt</option>
<option value="Matematik">Matematik</option>
<option value="Fysik">Fysik</option>
</select><input type="submit" value="Ok"></FORM></div><BR>
<%
Do while RS.EOF = False
%>
<tr><td style="border-bottom: 1 solid #000000" width="70%"><B>Overskrift:</B> <% =left(rs("Emne"), 25)%>...</td><td align="right" style="border-bottom: 1 solid #000000"><B>Dato:</B><%=FormatDateTime(rs("dato"), vbShortDate)%></td></tr>
<tr><td colspan="2" width="100%"><%=rs("tekst")%><BR><BR></td></tr>
<%
rs.movenext
Loop
%>
</table>
</table>
<br>
</body>
</html>