SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)

    Easy Question: Simple Guestbook-type script

    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.

    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>
    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?

  2. #2
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    Is there a chance I can get my question answered sometime soon? I need this information pretty soon.

  3. #3
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    May as well close this thread now. In a few hours I've got to have everything ready, so I'm gonna have to pay someone else to help me.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •