Witam , mam problem związany z liczbą stron.
Mam plik php i chciałabym by dorobić mu liczbe stron , czyli gdy zapełni się strona pierwsza i utworzy się strona 2 by była widoczna
Wszystko jest ładnie gdy na końcu adresu dopisze &page2 , &page3
np http://www.fordonskasm.pl/prawne.php?k=2
http://www.fordonskasm.pl/prawne.php?k=2?&page=2
http://www.fordonskasm.pl/prawne.php?k=2?&page=3
taka jest zawartość tego pliku
<?
if ($catid=="51") {
$txt = "Statut";
}
elseif ($catid=="52") {
$txt = "Regulaminy";
}
elseif ($catid=="53"){
$txt = "Akty prawne";
}
$p = new Pager;
$start = $p->findStart($limit);
$count = mysql_num_rows(mysql_query("SELECT id,title,preface,createdate FROM news WHERE categoryid=". $catid .""));
$pages = $p->findPages($count, $limit);
$i=$start+1;
$recordset = mysql_query("SELECT id,title,preface,createdate FROM news WHERE categoryid=".$catid." ORDER BY createdate DESC LIMIT ".$start.", ".$limit."");
if ($recordset)
{
while ($row = mysql_fetch_array($recordset))
{
?><br>
<table width="430" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#D9EFFF">
<tr bgcolor="#F0F9FF">
<td width="15" height="20">
<div align="center"><img src="news_punkt.gif" width="9" height="9"></div>
</td>
<td bgcolor="#F0F9FF" class="news1top"><? echo $txt;?> - <? echo stripslashes($row["title"]);?></td>
<td width="15" bgcolor="#F0F9FF" class="news1top"> </td>
</tr>
<tr>
<td> </td>
<td class="news2"><div align="justify">
<p><? echo cleantext(stripslashes($row["preface"]));?></p>
</div>
</td>
<td class="news2"> </td>
</tr>
<tr>
<td> </td>
<td><table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="195" height="20" class="news3data">
<div align="left"><? echo $row["createdate"];?></div>
</td>
<td width="121"> </td>
<td width="84"><?
$record = mysql_query("SELECT id,name FROM attachments WHERE section=".$catid." AND matid=".$row["id"]." ORDER BY id DESC");
if ($record)
{
while ($row2 = mysql_fetch_array($record))
{ ?><div align="right">
<a href="http://www.fordonskasm.pl/foto/<? echo $row2["name"];?>"?>"><img src="pobierz.gif" width="63" height="15" border="0"></a></div><?
}
}
mysql_free_result($record);
?></td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table>
<?
}
}
mysql_free_result($recordset);
?><br>
<table width="430" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#D9EFFF">
<tr>
<td width="15" height="20">
<div align="center"><img src="news2_punkt.gif" width="9" height="9"></div>
</td>
<td width="410" class="news1top">Podstawy prawne</td>
</tr>
<tr>
<td> </td>
<td><a href="prawne.php?k=1" class="news4zobacz">> Statut</a></td>
</tr>
<tr>
<td> </td>
<td><a href="prawne.php?k=2" class="news4zobacz">> Regulaminy</a></td>
</tr>
<tr>
<td> </td>
<td><a href="prawne.php?k=3" class="news4zobacz">> Akty prawne</a></td>
</tr>
</table>
<p> </p>
Czy można liczyc na pomoc , czy jeszcze sa potrzebne jakies materiały dodatkowe ?