hi there,
since very long time i am trying to solve my problem with pagination. as you may noticed i have posted many questions on forum. regarding my problem
i still havent solved my problem. so here i am again asking for help from you guys.
i am trying to paginate my portofolio page. as i have many diferent categories of my portofolio, ( like webdesign, flash design, graphic design, logo design, etc )
i have build out admin for my portofolio, its all working just fine.
Pagination is my big problem, i have tried so many classes, code snipets, nothing helped me.
i have two tables. " portofolio" and "category".
I am accessing results from portofolio based on category from category table using is set method.
if (isset($_GET['kat']) && isset($_GET['kat'])) {
if i type index.php?kat=1, that will display results from category 1
which looks like this :
$queryp=mysql_query("Select * from portofolio where category='$_GET[kat]'");
echo "<table width=100% border=0>\n";
echo "<tr><td >Project thumb</td><td ><div>Project Name</div></td><td ><div>Client name</div></td><td ><div>Url</div></td></tr>";
if (mysql_num_rows($queryp) == 0)
echo "This category has no data in it, either empty or deleted by admin";
elseif (mysql_num_rows($queryp) == 1){
}
while ($rowp=mysql_fetch_array($queryp)){
echo "<tr><td align='center'> <a href='index.php?client=$rowp[id]'><img src='porto/images/$rowp[photo]' border=0 align=\"left\"></a></td>";
echo "<td>$rowp[name]</td><td>$rowp[client]</td><td><a href='$rowp[url]' target=\"_blank\">Visit the site</a></td></tr>\n";
}
echo "</table><br>\n";
that is working just fine.
my problem starts here, how can i paginate this so my url looks
like this "index.php?kat=1&next, or different. it really doesnt matter as long as it works.
At the end iam very sorry for reposting my question.
I thank you all in advance for all your help, and sorry for broken english.
my comeplete code looks like this :
<!-- "porto" -->
<?php
if (isset($_GET['kat']) && isset($_GET['kat'])) {
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="0"><img name="box_upleft" src="prazan/box_upleft.gif" width="10" height="30" border="0" alt="portofolio"></td>
<td width="94%" align="center" valign="middle" background="prazan/box_r1_c2.gif"><div align="left"></div></td>
<td width="0"><img name="box_upright" src="prazan/box_upright.gif" width="6" height="30" border="0" alt="portofolio"></td>
</tr>
<tr>
<td background="prazan/box_left.gif"> </td>
<td width="100%" bgcolor="#6A5B5B"> <p>';
$queryp=mysql_query("Select * from portofolio where category='$_GET[kat]'");
echo "<table width=100% border=0>\n";
echo "<tr><td >Project thumb</td><td ><div>Project Name</div></td><td ><div>Client name</div></td><td ><div>Url</div></td></tr>";
if (mysql_num_rows($queryp) == 0)
echo "This category has no data in it, either empty or deleted by admin";
elseif (mysql_num_rows($queryp) == 1){
}
while ($rowp=mysql_fetch_array($queryp)){
echo "<tr><td align='center'> <a href='index.php?client=$rowp[id]'><img src='porto/images/$rowp[photo]' border=0 align=\"left\"></a></td>";
echo "<td>$rowp[name]</td><td>$rowp[client]</td><td><a href='$rowp[url]' target=\"_blank\">Visit the site</a></td></tr>\n";
}
echo "</table><br>\n";
echo '
</p> </td>
<td background="prazan/box_right.gif"><img name="box_right" src="prazan/box_right.gif" width="6" height="48" border="0" alt="portofolio"></td>
</tr>
<tr>
<td><img name="box_downleft" src="prazan/box_downleft.gif" width="10" height="5" border="0" alt="portofolio"></td>
<td background="prazan/box_down.gif"><img name="box_down" src="prazan/box_down.gif" width="79" height="5" border="0" alt="portofolio"></td>
<td><img name="box_downright" src="prazan/box_downright.gif" width="6" height="5" border="0" alt="portofolio"></td>
</tr>
</table>';
}
<!-- "is set ends here" -->
<!-- "porto ends here" -->
p.s.
please dont send me for some tutorials cause i been on many of them.