How do I use virtualpaginate for tabbed site - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How do I use virtualpaginate for tabbed site

Venu12Venu12 Posts: 3Member
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.

Sign In or Register to comment.