<% MYSQL = "SELECT ID, DATE, NAME, EMAIL, CITY, STATE, COUNTRY, SITE, COMMENTS FROM GUESTBOOK ORDER by ID DESC" rs.Open MySQL, dc, 3, 1 %> <% currentPage = request.queryString ("id") If currentPage = "" then currentPage = "1" End If pageSize = 5 Records = rs.RecordCount if NOT (Records = 0) then rs.pageSize = pageSize rs.AbsolutePage = currentPage End If pageNext = currentPage + 1 pagePrev = currentPage - 1 Pages = Records \ pageSize if Records mod pageSize then Pages = Pages + 1 End If %> My Guestbook
Site hosted by Angelfire.com: Build your free website today!
  Guestbook Entries

Total entries: <% = Records %>
<% if NOT (CInt(Records) = 0) then 'if there are no records in the database it doesn't go on dysplaying then and only sais that there are no records Do While (Not rs.EOF) and (currentRecords < pageSize) 'runs through the records and displays them currentRecords = currentRecords + 1 'counts currently dysplayed records %>
  Name:  <%= rs("NAME") %>
E-mail><%= rs("EMAIL")%>
City:  <%= rs("CITY") %>
State:  <% rs("STATE") %>
Country:  <% rs("COUNTRY") %>
How did you find this site?  <% rs("SITE") %>
Comments/Suggestions: <%= rs("COMMENTS") %>

Date Posted: <%= rs("DATE") %>

<% rs.MoveNext Loop else response.write ("

No records found, be the first to post a comment!
") & VBCRLF End If %> <% rs.Close Set rs = Nothing dc.Close Set dc = Nothing %>