paginanummering invoegen bij galerij uit db
Kan iemand mij helpen.
Ik gebruik een script waarmee ik foto en omschrijving kan uploaden naar database en dit in een site kan laten zien .
Maar er zijn nu veel fotos toegevoegd , dus ik moet
paginanummering aanbrengen.
Ik heb al het een en ander geprobeerd, ook met script uit dit forum, maar dat lukt niet.
heeft iemand een idee hoe ik pagina nummering in onderstaand script kan zetten.
alvast bedankt.
pap
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?
$item = @$_GET['catid'];
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$z = 0;
$colname_Recordset1 = "1";
mysql_select_db($database_BAGLANTI, $BAGLANTI);
$query_Recordset1 = sprintf("SELECT * FROM item WHERE catid='$item' ORDER BY name ASC");
$Recordset1 = mysql_query($query_Recordset1, $BAGLANTI) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
do{
$A = $row_Recordset1['name'];
$B = $row_Recordset1['nameid'];
$foto = $row_Recordset1['foto'];
$tnm = $row_Recordset1['tanim'];
?>
$item = @$_GET['catid'];
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$z = 0;
$colname_Recordset1 = "1";
mysql_select_db($database_BAGLANTI, $BAGLANTI);
$query_Recordset1 = sprintf("SELECT * FROM item WHERE catid='$item' ORDER BY name ASC");
$Recordset1 = mysql_query($query_Recordset1, $BAGLANTI) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
do{
$A = $row_Recordset1['name'];
$B = $row_Recordset1['nameid'];
$foto = $row_Recordset1['foto'];
$tnm = $row_Recordset1['tanim'];
?>
http://www.phphulp.nl/php/zoeken.php?search=1&q=pagina+nummering&w=PHP+scripts&=+Zoeken+
en de goede resultaten zijn:
http://www.phphulp.nl/php/scripts/6/727/
http://www.phphulp.nl/php/scripts/2/123/
http://www.phphulp.nl/php/scripts/3/219/
http://www.phphulp.nl/php/scripts/3/218/
http://www.phphulp.nl/php/scripts/2/285/
http://www.phphulp.nl/php/scripts/4/631/
http://www.phphulp.nl/php/scripts/1/629/
Gewijzigd op 01/01/1970 01:00:00 door - -
Tips:
1) Je moet weten hoeveel records je totaal hebt
2) Je moet weten hoeveel records je per pagina wilt laten zien
3) Je moet weten met welke record je pagina moet beginnen
foto en omschrijving zien,zoals in mijn script:
do{
$A = $row_Recordset1['name'];
$B = $row_Recordset1['nameid'];
$foto = $row_Recordset1['foto'];
$tnm = $row_Recordset1['tanim'];
nu zijn er zeker 50 fotos onder elkaar. ik wil dit max. 5 per pagina maken. krijg wel de limit voor elkaar, maar niet volgende/vorige, met fotos.