Jump to content
xisto Community
Sign in to follow this  
sofiaweb

Displaying Results Across Pages Displaying results across pages

Recommended Posts

I've bought a script for my shop, but it list's the first page and then nothing else. I can't find out how to see the rest of the results on other pages. At the moment the code is:

<?	 $datecheck=date("Y-m-d H:i:s");	 $feature_sql="select * from shop where  picture1!='' and (expire_date > '$datecheck') order by expire_date limit 0, 10";		 $feature_res=mysql_query($feature_sql);		 $tot_count=mysql_num_rows($feature_res);		 $count=0;		 if($tot_count > 0)		 {		  ?>
at the top of the page. Then just before the results are displayed is:
<?   $l=1;		   while($feature_row=mysql_fetch_array($feature_res))	   {	   $string_1=$feature_row[product_descrip];   $i=$feature_row['id'];	   ?>   <? if(($l==1)||($l==3))   {   echo "<tr>";   }   ?>
and finally at the bottom is:
<? $l++;   if(($l==1)||($l==3)) { echo "<tr>"; $l=1; } $allpro2 = $feature_row['id'];   $allpro1 = "$allpro2";  if($allpro!=""){ $allpro = "$allpro1|$allpro"; } if($allpro==""){ $allpro = "$allpro1"; } ?> <? } $allpro3 = "$allpro";	 ?>	 <?	 }	 ?>
I'm very new to php so don't even know if the code to have multiple pages is there already. At the bottom of the page I want to display a series of numbers so that people can go to which ever page they want and I want those numbers to be controlled dynamically so I don't need to create multiple pages for each of the shops categories.
Thanx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.