Pagination Problem

I have to show 4 images per page.

I am getting images dynamically from DB without any issue. when it comes to pagination,

after 4th image the next images should be display on next page. but in my page it is showing next to that 4th image.

plzz help me…

Hi,

Can you post the PHP code that you’re using to query the database and display the results?

Now as shown in above image… my pagination problem has been solved.
Now here is my requirement,
when i select a radio button and press “proceed” button on bottom, it should open up that particular theme based upon their id.

Plz help me…


<?php include 'configuredb.php'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Themes | Gallery Club</title>
		<?php include 'head.php'; ?>
		<link href="style.css" rel="stylesheet" type="text/css"></link>
	</head>
<body>
	<?php include 'header.php'; ?>	
	<?php include 'adminleftsidebar.php'; ?>	
	<?php require("function.php");?>


    <?php	
        $page=1;//Default page
        $limit=3;//Records per page
        $start=0;//starts displaying records from 0
        if(isset($_GET['page']) && $_GET['page']!=''){
                $page=$_GET['page'];
        }
                $start=($page-1)*$limit;
        ?>


	<div id="content" style="margin-left: 100px;">
		<div class="contentTop">
			<span class="pageTitle"><span class="icon-images"></span>Themes</span>
			<ul class="quickStats">
				<li>
					<a href="" class="redImg"><img src="images/icons/quickstats/user.png" alt="" /></a>
					<div class="floatR"><strong class="blue">Welcome</strong><span><?php echo $_SESSION['firstName'].' '.$_SESSION['lastName']; ?> </span></div>
				</li>
			</ul>
			<div class="clear"></div>
		</div>
		
		<!-- Breadcrumbs line -->
		<div class="breadLine">
			<div class="bc"></div>
		</div>
		<!-- Breadcrumbs line Ends-->
		
		<!-- Main content -->
		<div class="wrapper">
                    <form id="usualValidate" class="main" method="POST" action="sample1.php" enctype="multipart/form-data">
			<!-- Media table -->			
				<div class="widget">
					<div class="whead"><h6>Basic</h6><div class="clear"></div></div>
					<div class="shownpars">
						<table cellpadding="0" cellspacing="0" border="0" class="dTable dataTable">
							
							<tbody>
								<tr>
									<?php
                                        $query=mysql_query("select id from 20kclub_themes");
                                        $rows=mysql_num_rows($query);
										$query = mysql_query("SELECT * from 20kclub_themes WHERE theme_type = '1' order by id ASC LIMIT $start, $limit");
                                        if(mysql_num_rows($query)>0){
										while($basicThemeRecords = mysql_fetch_array($query,1))
										{
									?>
									<td>
										<a href="themes/big/<?php echo $basicThemeRecords['bigimage'];?>" class="lightbox" rel="group" style="margin-left: 20px;">
										<img src="themes/small/<?php echo $basicThemeRecords['smallimage'];?>" alt=""/> </a>
                                        <p><input type="radio" name="basic" id="Unsigned" value=""/>&nbsp;&nbsp;<a href="<?php echo $basicThemeRecords['theme_demo_link']; ?>" target="_blank"><?=$basicThemeRecords['theme_name']?></a></p>														
									</td>									
									<?php }} ?>
                                        <?php echo pagination($limit,$page,'pagination.php?page=',$rows);	//call function to show pagination
                                        ?>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
                <div class="widget">
					<div class="whead"><h6>Standard</h6><div class="clear"></div></div>
					<div class="shownpars">
						<table cellpadding="0" cellspacing="0" border="0" class="dTable dataTable">
							
							<tbody>
								<tr>
									<?php
                                        $query=mysql_query("select id from 20kclub_themes");
                                        $rows=mysql_num_rows($query);
										$query = mysql_query("SELECT * from 20kclub_themes WHERE theme_type = '2' order by id ASC LIMIT $start, $limit");
                                        if(mysql_num_rows($query)>0){
										while($basicThemeRecords = mysql_fetch_array($query,1))
										{
									?>
									<td>
										<a href="themes/big/<?php echo $basicThemeRecords['bigimage'];?>" class="lightbox" rel="group" style="margin-left: 20px;">
										<img src="themes/small/<?php echo $basicThemeRecords['smallimage'];?>" alt=""/> </a>
										<p><input type="radio" name="Standard" id="Unsigned" value=""/>&nbsp;&nbsp;<a href="<?php echo $basicThemeRecords['theme_demo_link']; ?>" target="_blank"><?=$basicThemeRecords['theme_name']?></a></p>
									</td>									
									<?php }} ?>
                                    <?php
                                    echo pagination($limit,$page,'pagination.php?page=',$rows);	//call function to show pagination
                                    ?>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
                <div class="widget">
					<div class="whead"><h6>Professional</h6><div class="clear"></div></div>
					<div class="shownpars">
						<table cellpadding="0" cellspacing="0" border="0" class="dTable dataTable">
							
							<tbody>
								<tr>
									<?php
                                    $query=mysql_query("select id from 20kclub_themes");
                                    $rows=mysql_num_rows($query);
									$query = mysql_query("SELECT * from 20kclub_themes WHERE theme_type = '3' order by id ASC LIMIT $start, $limit");
                                    if(mysql_num_rows($query)>0){
									while($basicThemeRecords = mysql_fetch_array($query,1))
									{
									?>
									<td>
										<a href="themes/big/<?php echo $basicThemeRecords['bigimage'];?>" class="lightbox" rel="group" style="margin-left: 20px;">
										<img src="themes/small/<?php echo $basicThemeRecords['smallimage'];?>" alt=""/> </a>
										<p><input type="radio" name="Professional" id="Unsigned" value=""/>&nbsp;&nbsp;<a href="<?php echo $basicThemeRecords['theme_demo_link']; ?>" target="_blank"><?=$basicThemeRecords['theme_name']?></a></p>
									</td>									
									<?php }} ?>
                                    <?php
                                    echo pagination($limit,$page,'pagination.php?page=',$rows);	//call function to show pagination
                                    ?>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
                <div class="widget">
					<div class="whead"><h6>Advanced</h6><div class="clear"></div></div>
					<div class="shownpars">
						<table cellpadding="0" cellspacing="0" border="0" class="dTable dataTable">
							
							<tbody>
								<tr>
									<?php
                                        $query=mysql_query("select id from 20kclub_themes");
                                        $rows=mysql_num_rows($query);
										$query = mysql_query("SELECT * from 20kclub_themes WHERE theme_type = '4' order by id ASC LIMIT $start, $limit");
                                        if(mysql_num_rows($query)>0){
										while($basicThemeRecords = mysql_fetch_array($query,1))
										{
									?>
									<td>
										<a href="themes/big/<?php echo $basicThemeRecords['bigimage'];?>" class="lightbox" rel="group" style="margin-left: 20px;">
										<img src="themes/small/<?php echo $basicThemeRecords['smallimage'];?>" alt=""/> </a>
										<p><input type="radio" name="Advanced" id="Unsigned" value=""/>&nbsp;&nbsp;<a href="<?php echo $basicThemeRecords['theme_demo_link']; ?>" target="_blank"><?=$basicThemeRecords['theme_name']?></a></p>																			
									</td>									
									<?php }} ?>
									<?php echo pagination($limit,$page,'pagination.php?page=',$rows);	//call function to show pagination ?>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
                </form>
                </div>
		 <!-- Main content ends -->
		</div>
                <div class="formRow" align="right">
<!--                    <a href="sample1.php" class="buttonM bGreen" style="color:white"><span>Proceed</span></a>-->
                    <input type="submit" value="Proceed" class="buttonM bGreen" name="updatethemeInfo" />
                </div>
	</div>
	<!-- Content ends -->

</body>
</html>

I can see that the form action is sample1.php, but the radio buttons don’t have any value set. What information should be submitted when the user selects a radio button and clicks the proceed button?