I'm trying to create a simple guestbook like script to work off a database. All I want is for people to add their Name and Comment in a form, and once a comment has been made, it directs off to another page which shows all the comments.
This is the code I've been using for a previous thing I've done, and I'd have thought it wouldn't have been much different from this, so can someone tell me how I'd go about getting this working?Code:<%@LANGUAGE="VBSCRIPT"%> <% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("news1.mdb") & ";" dim SQL SQL = "select name,email from authors" set RS = Conn.execute(SQL) %> <html> <head> <title>Author List</title> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="400"> <tr> <td><b><font fae="verdana" size="3">Name</font></b></td> <td><b><font fae="verdana" size="3">Email</font></b></td> </tr> <%do while not RS.eof%> <tr> <td><font face="verdana" size="2"><%=RS("name")%></font></td> <td><font face="verdana" size="2"><a href="mailto:"<%=RS("email")%>"><%=RS("email")%></a></font></td> </tr> <%RS.movenext loop%> </table> <%Conn.close%> </body> </html>




Bookmarks