Moin Holgi,
<?php
include ("../data.inc.php");
$currentPic=$_GET['currentPic'];
$abfrage = mysql_query("Select * from bilder where bi_kategorie=1 order by bi_id desc", $conn);
$zeilen = mysql_num_rows($abfrage);for ($i=0; $i<$zeilen; $i++)
{//$bi_id = mysql_result($abfrage, $i, "bi_id");
//$bi_beschreibung = mysql_result($abfrage, $i, "bi_beschreibung");
//$bi_file = mysql_result($abfrage, $i, "bi_file");
//$bi_kategorie = mysql_result($abfrage, $i, "bi_kategorie");
$bi_beschreibung[$i] = mysql_result($abfrage, $i, "bi_beschreibung");
$bi_file[$i] = mysql_result($abfrage, $i, "bi_file");}
$number_pics = count ($bi_file);
if ( empty ($currentPic) )
$currentPic = 0;
if ( ($currentPic > $number_pics) || ($currentPic == $number_pics) )
$currentPic = '0';
$last = $number_pics - 1;
$next = $currentPic + 1;
if ($currentPic > 0 )
$back = $currentPic - 1;
else
$currentPic = "0";
if ($currentPic > 0 )
$nav=$back;
else
$nav=$last;
echo "<a href=bilder.php?id=$nav>zurück</a>";
echo "<a href=bilder.php?id=$next>vor</a>";
?>
Ich hoffe dieser Ansatz hilft die weiter.
Grüsse
Mike
Freunde kommen und gehen. Feinde sammeln sich an.