distribute in a page..

R

Robert

Hello..

I'm for a very long time trying to make somthing, but everytime it doesn't work..
This is what must happend:

If i have a guestbook with 100 letters, then wath i want is that a script distribute the letters on a page of 10 end that i have under the letters a buttun to go to te next letters ( 11-20 ) and a button to go back if you are not at page one. And in the middle of those 2 buttons i want to see how many pages with letters there are, and that you kan choose a number of a page to go to it.

It must show a bit like this

(1) (2) (3) (4) (5) Next page <-- this if you are on the first page
Prevous page (1) (2) (3) (4) (5) next page <-- this if you are on page 2 or whits one you want..

It must happend with this script:

----------------------------------------------
set rst = cnn.execute("SELECT * FROM tblGastenboek WHERE Gb_Pro_ID_Aan=" & CheckDBNum(Request("Pro_ID")) & " ORDER BY Gb_ID DESC ")

do until rst.eof
%>
<html>
<head>
<title>Profiel wijzigen</title>
<link rel="stylesheet" type="text/css" href="Style/Default.css">
</head>
<body topmargin="12" leftmargin="10" rightmargin="10" bottommargin="10">
<br>
<center>
<table width="400" cellpadding="0" cellspacing="1" border="0" bgcolor="#000000">
<tr>
<td bgcolor="#000000" height="15" width="165"><font color="#FFFFFF"><b>&nbsp;<%=rst("GBNickname")%></b></font></td>
<td bgcolor="#000000" width="84" align="center"><%
sPro_ID = session("Pro_ID")
if trim(sPro_ID) = trim(request("Pro_ID")) then %>
<a href="Gastenboek.asp?ACTION=DELETE&ID=<%=rst("GB_ID")%>&Pro_ID=<%=request("Pro_ID")%>"><font color="#FFFFFF">&nbsp;Verwijderen&nbsp;</font></a>
<%end if%>
</td>
<td bgcolor="#000000" width="147" align="center"><font color="#FFFFFF"><b><%=rst("GBDatum")%></b></font></td>
</tr>
<tr>
<td bgcolor="white" colspan="3">
<%
Bericht = rst("GBtekst")
If Bericht <> "" then
Bericht = Replace(Bericht, ">", "&gt;")
Bericht = Replace(Bericht, "<", "&lt;")
End if
%>
<%=Bericht%>
</td>
</tr>
</table>
</center>
</body>
</html>
<%
rst.movenext
loop
rst.close
set rst = nothing
----------------------------------------------

Is there sombody how can make it for me in this script.. please don't tell me wath i can try or can do, it wont work.. Zo please
if you know how to fix it, please make it for me..

If you can help me i wanna thank you very much!

Gr. Robert
 
S

Steven Burn

http://aspfaq.com/show.asp?id=2120

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Hello..

I'm for a very long time trying to make somthing, but everytime it doesn't
work..
This is what must happend:

If i have a guestbook with 100 letters, then wath i want is that a script
distribute the letters on a page of 10 end that i have under the letters a
buttun to go to te next letters ( 11-20 ) and a button to go back if you are
not at page one. And in the middle of those 2 buttons i want to see how many
pages with letters there are, and that you kan choose a number of a page to
go to it.

It must show a bit like this

(1) (2) (3) (4) (5) Next page <-- this if you are on the first page
Prevous page (1) (2) (3) (4) (5) next page <-- this if you are on page 2 or
whits one you want..

It must happend with this script:

----------------------------------------------
set rst = cnn.execute("SELECT * FROM tblGastenboek WHERE Gb_Pro_ID_Aan=" &
CheckDBNum(Request("Pro_ID")) & " ORDER BY Gb_ID DESC ")

do until rst.eof
%>
<html>
<head>
<title>Profiel wijzigen</title>
<link rel="stylesheet" type="text/css" href="Style/Default.css">
</head>
<body topmargin="12" leftmargin="10" rightmargin="10" bottommargin="10">
<br>
<center>
<table width="400" cellpadding="0" cellspacing="1" border="0"
bgcolor="#000000">
<tr>
<td bgcolor="#000000" height="15" width="165"><font
color="#FFFFFF"><b>&nbsp;<%=rst("GBNickname")%></b></font></td>
<td bgcolor="#000000" width="84" align="center"><%
sPro_ID = session("Pro_ID")
if trim(sPro_ID) = trim(request("Pro_ID")) then %>
<a
href="Gastenboek.asp?ACTION=DELETE&ID=<%=rst("GB_ID")%>&Pro_ID=<%=request("P
ro_ID")%>"><font color="#FFFFFF">&nbsp;Verwijderen&nbsp;</font></a>
<%end if%>
</td>
<td bgcolor="#000000" width="147" align="center"><font
color="#FFFFFF"><b><%=rst("GBDatum")%></b></font></td>
</tr>
<tr>
<td bgcolor="white" colspan="3">
<%
Bericht = rst("GBtekst")
If Bericht <> "" then
Bericht = Replace(Bericht, ">", "&gt;")
Bericht = Replace(Bericht, "<", "&lt;")
End if
%>
<%=Bericht%>
</td>
</tr>
</table>
</center>
</body>
</html>
<%
rst.movenext
loop
rst.close
set rst = nothing
----------------------------------------------

Is there sombody how can make it for me in this script.. please don't tell
me wath i can try or can do, it wont work.. Zo please
if you know how to fix it, please make it for me..

If you can help me i wanna thank you very much!

Gr. Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top