How do I use virtualpaginate for tabbed site

I am trying to individyally paginate tabs on the page separately. The virtualpagination in one tab appears in the other. How do I resolve this?

Code:

<?php
// database connection
require_once('./includes/base.php');

if($_GET['logout'] == 1){
@$_SESSION = array();
@session_unregister($_SESSION['userID']);
@session_unregister($_SESSION['userName']);
@session_unregister($_SESSION['userUser']);
@session_unregister($_SESSION['userPass']);
@session_destroy();
}

require("./templates/$template/header.php");

?>




function isClear()
{
document.myForm[0].value='';
return true;

}


<?php
ob_start();
if(!empty($_SESSION['userID']) and !empty($_POST['user'])){
echo '<form action="search.php" method="post" name="myForm">

';
}
?>




Hello world <?php echo "$sitename"; ?> is blah, blah, blah.......!





<?php


$sql = mysql_query("SELECT users.userUser, posts.postID, posts.postPost, posts.postTime, posts.postComments, userAvatar FROM users, posts WHERE users.userID = posts.postUserID ORDER BY posts.postTime DESC ");
while($row = mysql_fetch_array($sql)){
$abcd= $row['userName'];
$abcd = str_replace (" ", "-", $abcd);
$time = reltime($row['postTime']);

echo '
<div class="virtualpage">
'.$row['postPost'].'Posted by: '.$row['userUser'].', Comments '.$row['postComments'].' , Time elapsed:  '.$time.'

';}




?>















<?php

$sql = mysql_query("SELECT users.userUser, links.linksID, links.linksLink, links.linksPost, links.linksTime, links.linksComments,userAvatar FROM users, links WHERE users.userID = links.linksUserID ORDER BY links.linksTime DESC");
while($row = mysql_fetch_array($sql)){
$abcd= $row['userName'];
$abcd = str_replace (" ", "-", $abcd);
$time1 = reltime($row['linksTime']);

echo '
<div class="virtualpage">
'.$row['linksPost'].'Posted by: '.$row['userUser'].', Comments '.$row['linksComments'].' , Time elapsed:  '.$time1.'

';}

?>







<?php
// testing
grabimages('SELECT users.userUser, images.imagesID, images.imagesFile, images.imagesPost, images.imagesTime, images.imagesComments FROM users, images WHERE users.userID = images.imagesUserID ORDER BY images.imagesTime DESC LIMIT 20');

?>











<?php

// Display footer
require("./templates/$template/footer.php");
?>


var gallery=new virtualpaginate("virtualpage",10)
gallery.buildpagination("gallerypaginate")

I am a self taught php programmer. So, please mention the corrected code. Thanks.

Comments

  • I fixed the problem all by myself. My site www.allmicrochat.com is now running with virtual pagination in each and every tab!

    Thanks anyway. Learned somenthing new as a self taught prgrammer.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion