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:
PHP Code:
<? $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:
PHP Code:
<? $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:
PHP Code:
<? $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.
Thanks
|