Hi,
I had done pagination before, and my code has the same structure and i think the problem could be due to the pagination section ie:
instead of :
"// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\"><<Previous</a> ";
}
"
you could do this:
"// Build Previous Link
if($page > 1){
$prev = ($page - 1);
$words=$_GET['Query'];
$type=$_GET['SearchView'];
$search_type=$_GET['SearchType'];
$max_results=20;
$sort=$_GET['Sort'];
echo "<a href=search_pagin.php?page=$prev&Query=$words&SearchView=$type&$max_results&Sort=$sort&SearchType=$search_type> previous < </a> ";
} "
do note 
words,$type, etc are only variables(which i extract the code from my own program of course), these variables are passsed on to the next page or link
instead of :
"for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i\">$i</a> ";
}
}
"
you could do this:
"for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
$words=$_GET['Query'];
$type=$_GET['SearchView'];
$search_type=$_GET['SearchType'];
$max_results=20;
$sort=$_GET['Sort'];
echo "<a href=search_pagin.php?page=$i&Query=$words&SearchView=$type&$max_results&Sort=$sort&SearchType=$search_type>$i</a> ";
}
} "
and instead of :
"// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next\">Next>></a>";
}
echo "</center>";
?> "
you could do this:
"// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
$words=$_GET['Query'];
$type=$_GET['SearchView'];
$search_type=$_GET['SearchType'];
$max_results=20;
$sort=$_GET['Sort'];
echo "<a href=search_pagin.php?page=$next&Query=$words&SearchView=$type&$max_results&Sort=$sort&SearchType=$search_type> > next20 </a>";
} "
it sounds lengthy, but i hope it helps!!