så er små fejlene også rettet.
Du skal have en database, med id(automatisk) og en kolonne "kommentar", skal laves i notat form, hvis du bruger access.
:-) karsten_larsen
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Historie</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
<%
strConnect = "Data Source=..\db\kommentar.mdb;Provider=Microsoft.Jet.OLEDB.4.0;"
Set Conn = Server.CreateObject ("ADODB.Connection")
Conn.Open strConnect
If request.Form("send") = "send" Then
' Når indlaeg er sendt indlaeses det i databasen
strSQL = "Insert into tabel_historie ('kommentar') values (" & request.Form("kommentar") & ")"
Conn.Execute(strSQL)
end if %>
<table width="100%" border="1">
<tr>
<td>Historien</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit amet, consetetur sadipscing elitr etc.
</td>
</tr>
</table>
<% 'Udskriv kommetar
strSQL = "Select kommentar from tabel_historie"
Set rs = Conn.Execute(strSQL)
Do While Not rs.EOF
Response.Write rs("kommentar") & "<br>"
rs.MoveNext
Loop
Conn.close
set Conn = nothing %>
<form name="form1" method="post" action="historie.asp">
<input type="text" name="kommentar">
<input type="submit" name="send" value="send">
<input type="reset" name="submit" value="Reset">
</form>
</body>
</html>