i check the includes again.
seams to be ok 2. (sorry about the
)
so here i post the rest source because i really can't figure it out. (i put all the source together in one file)
[code=php]
include("conf.php");
include("functions.php");
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($db) or die ("Unable to select database!");
$limit = 3;
$query_count = "SELECT id FROM cd";
$result_count = mysql_query($query_count);
$totalrows = mysql_num_rows($result_count);
if(empty($page))
$page = 1;
$limitvalue = $page * $limit - ($limit);
$query = "SELECT * FROM cd ORDER BY timestamp DESC LIMIT $limitvalue, $limit";
$result = mysql_query($query) or die("Error: " . mysql_error());
if (mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_object($result))
{
<a href="lp_view.php?id=<? echo $row->id; ?>"><img src="../covers/<? echo $row->titel; ?>" border="0" alt="cover - click for more information" width="90" height="90"></a><b>
<font face="Verdana, Arial, Helvetica, sans-serif, Holstein" size="-2" class="wfi">
}
}
else
{
<b>NO INPUT</b></font><font face="Verdana, Arial, Helvetica, sans-serif, Holstein" size="-2"><i>
if($page != 1){
$pageprev = $page--;
echo("<a href=\"$PHP_SELF&page=$pageprev\">PREV</a> ");
}else
echo("PREV ");
$numofpages = $totalrows / $limit;
for($i = 1; $i <= $numofpages; $i++){
if($i == $page)
echo($i." ");
else
echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");
}
if(($totalrows % $limit) != 0){
if($i == $page)
echo($i." ");
else
echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");
}
if(($totalrows - ($limit * $page)) > 0){
$pagenext = $page++;
echo("<a href=\"$PHP_SELF&page=$pageprev\">NEXT</a>");
}else
echo(" NEXT ".$limit);
mysql_free_result($result);
}