php doesn't load dynamic pagination
i tried to follow the directions given to me http://www.dynamicdrive.com/dynamici...nate/index.htm but nothing is being echoed from my database and all my tables and coloums are correct...not to sure if it is a ajax problem or php...but i assumed the coding only wanted me to change the php
heres my coding
<html>
<head>
<link rel="stylesheet" type="text/css" href="ajaxpagination.css" />
<script src="ajaxpagination.js" type="text/javascript">
</script>
</head>
<body>
<ul>
<li><a href="javascript:mybookinstance.refresh(bookonflowers)">Load Flowers Data Set (4 pages)</a></li>
<li><a href="javascript:mybookinstance.refresh(bookonanimals)">Load Animals Data Set (3 pages)</a></li>
<li><a href="javascript:mybookinstance.refresh(bookcombo)">Load Large Data Set (12 pages)</a> (Notice the 4 page range limit within pagination DIV)</li>
</ul>
<div id="paginate-top"> </div>
<div id="bookcontent"> </div>
<div id="paginate-bottom"> </div>
<p><a href="javascript:mybookinstance.selectpage(1)">Select 2nd page dynamically</a></p>
<script type="text/javascript">
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("registration") or die(mysql_error());
echo "var commentsbook={\n"; //Dynamically output javascript variable
$commentids=mysql_query("SELECT `id` from `users`"); //get IDs to last 5 comment pages
$idarray=array();
while ($theid=mysql_fetch_array($commentids)){
array_push($idarray, "'http://www.localhost.com/test/index.php?id=" . $theid[id] . "'");
}
echo "pages: [" . implode(",", $idarray) . "],\n"; //output: pages: [filepath1, filepath2, filepath3, etc],
echo "selectedpage: 0\n}";
?>
var comments=new ajaxpageclass.createBook(commentsbook, "bookcontent", ["paginate-top", "paginate-bottom"])
</script>
</body>
</html>