i have one php page with paging option
i use follwoing sql statement to generate total number of pages
$rowsPerPage=25;
$pageNum = 1;
if(isset($_GET['page']))
{
$pageNum = $_GET['page'];
}
$offset = ($pageNum - 1) * $rowsPerPage;
$query = "SELECT COUNT(id) AS numrows FROM TableA"
$result = mysql_query($query) or die('Error, query failed');
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['numrows'];
$maxPage = ceil($numrows/$rowsPerPage);
now i have follwoing code to write Next / Previous pages link
$page = $pageNum - 1;
$prev = " <a href=\"$self?page=$page\" class=\"RedNorm\">[Prev]</a> ";
$page = $pageNum + 1;
$next = " <a href=\"$self?page=$page\" class=\"RedNorm\">[Next]</a> ";
my problem is:
when i pass any query sting with page like abc.php?m=1&page=2
that query string will not be available once i click on [Prev] / [Next] page link.
i can undersatnd the problem is in
$prev = " <a href=\"$self?page=$page\" class=\"RedNorm\">[Prev]</a> ";
statement
how can i get page name plus all the query strings on place of $self as this is only getting page name.
Thanks