What is the variable that I should pass from page to page?
Hello,
I have gotten some code for pagination, and I have gotten it to work for the first page. However, when I click on the links to the next pages, the results are blank.
So, apparently the problem is that I am not passing the correct variable to these next pages.
The problem is that my output that I'm trying to paginate is a little fancy, and it's hard for me to tell what variable to pass from page to page, and whether or not this variable is an array.
My output code is below. This is all kicked off after a user submits a value for the variable "$find" via an HTML form. What should I use as a variable to pass from page to page?
Thanks in advance,
John
$result=mysql_query("SHOW TABLES FROM sand2 LIKE '%$find%'")
or die(mysql_error());
if(mysql_num_rows($result)>0){
while($table=mysql_fetch_row($result)){
print "<p class=\"topic\">$table[0]</p>\n";
$r=mysql_query("SELECT * , votes_up - votes_down AS effective_vote FROM `$table[0]` ORDER BY effective_vote DESC LIMIT $offset, $rowsperpage");
print "<table class=\"navbar\">\n";
while($row=mysql_fetch_array($r)){
print "<tr>";
print "<td>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";
print "<td class='votes'>".'<span class="votes_count" id="votes_count'.$row['id'].'">'.number_format($effective_vote).'</span>'."</td>";
print "<td class='ballot'>".'<span class="button" id="button'.$row['id'].'">'.'<a href="javascript:;" class="cell1" id="'.$row['id'].'">'.Vote.'</a>'.'</span>'."</td>";
}
print "</tr>\n";
}
print "</table>\n";
