If you have something to say, let everyone see it in this guestbook feature.
A compliment? A beef? A query? We can take it!!
<%
' connect to db.
set Conn=Server.CreateObject("ADODB.Connection")
Conn.Provider="Microsoft.Jet.OLEDB.4.0"
Conn.Open(Server.Mappath("yelldb/yelldb.mdb"))
' set rs and select all required records.
set rsYell = Server.CreateObject("ADODB.recordset")
rsYell.Open "SELECT * FROM Yells order by YellDate desc", conn, 3, 1, 1
' if there are no records available let the user know.
if rsYell.EOF then
response.write("There are no Yells to be viewed. ")
' else if there are records, display these.
else
' a count variable helps us loop through the records. The page size lets us define how many records we want to display in the table on the user page.
Dim yellCount, yellPageSize
yellCount = 1
yellPageSize = 12
rsYell.PageSize = yellPageSize
' looping through records.
do while NOT rsYell.EOF and yellCount <= yellPageSize
response.write("> " & Replace(rsYell("YellMessage"),"APOS","'") & " - " & Replace(rsYell("YellName"),"APOS","'") & " | " & rsYell("YellDate") & "")
' if an Admin is logged in, display the option to delete.
if sLoggedIn = "True" then
response.write(" - d?")
end if
response.write(" ")
yellCount = yellCount + 1
rsYell.MoveNext
Loop
rsYell.Close
Conn.Close
set Conn = Nothing
%>
View all
<% end if %>
|
|
|
Warthog Web Design, PO Box 15274, Bellair, 4006, South Africa
Ph/Fax.: 031 465 7781
Cell: 082 488 8493
|
|
Mail Us: hog@warthog.co.za
|
|
This page URL: www.warthog.co.za/webdesigners.htm
|
|
|
|