ok i have the code working at least aalittle bit...i can echo my results inbetween the pages...thing is now how do i link my pages to the results...i changed the variables to post as this was suppose to be for post origally
Code:
<div id="paginate-top"> </div>
<div id="bookcontent">
<?php
if(is_numeric($_GET['page'])){
$page = $_GET['page'];
}
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("registration") or die(mysql_error());
$da = "SELECT * FROM post_profile WHERE userid = '1' ORDER BY ppid DESC LIMIT 10";
$usposts = mysql_query($da) or die(mysql_error());
//This is where you display your query results
while($infoif = mysql_fetch_array($usposts))
{
$post= "{$infoif['post']}";
echo"$post<br>";
}
?>
FINALLY ECHOING SOMETHING</div>
<div id="paginate-bottom"> </div>
<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 `ppid` from `post_profile` LIMIT 2"); //get IDs to last 5 comment pages
$idarray=array();
while ($theid=mysql_fetch_array($commentids)){
array_push($idarray, "'" . $theid[ppid] . "'");
}
echo "pages: [" . implode(",",$idarray) . "],\n"; //output: pages: [filepath1, filepath2, file
echo "selectedpage: 0\n}";
?>
var comments=new ajaxpageclass.createBook(commentsbook, "bookdiv", ["paginate-top", "paginate-bottom"])
</script>
</body>
Bookmarks