Create a table called tblcounter with one field called counterid as shown in here:
----------copy and pase below this line to a new file and save it as counter.inc----------
<%
dim counter, c, r, q, s
set c = server.CreateObject("ADODB.Connection")
set r = server.CreateObject("ADODB.Recordset")
c.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("counter.mdb") & ";"
s = "Select * From tblcounter"
set r = c.Execute (s)
counter = counter + r("counterid") + 1
response.write "<b><font color=""#006599"">" & counter & "</font></b>"
q = "Update tblcounter Set counterid = '" & counter & "' WHERE counterid = " & r("counterid") & " "
c.Execute(q)
%>
----------end copy and paste---------
Add this to your page using the include statement <!--#include file="counter.inc"-->
See the
example here
Download the
demo here
__________________