Pagination?

I applied pagination to this page
http://mycorenetwork.com/asp/reviews/index.php?page=1
using
http://www.dynamicdrive.com/style/csslibrary/item/css_pagination_links/
as an example
I got stuck in trying to get the previous button to work.
Heres the php code I have in that spot, why is this not working


$total_pages = ceil($total_records / 20); 

if ($page==2) {  echo "<li><a href='index.php?page=1' class='prevnext'>« previous</a></li>"; } else if ($page==1) { echo "<li><a href='index.php?page=1' class='prevnext disabledlink'>« previous</a></li>"; }
for ($i=1; $i<=$total_pages; $i++) { 
            echo "<li><a href='index.php?page=".$i."'>".$i."</a></li>"; 
}

Thanks…

nvm