|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
On-Line Catalog
Ok, got a question for the whizkids here. I have created a PHP page that reads a MySQL DB. It then produces a page of products, with images, descriptions and price. I have broken it down by catagory so only the right pieces land on their designated pages. However all said and done, I have 50 pieces on one page. How can I cut it off at say 10, and clicking "Continue" produces another page of 10.???
|
|
#2
|
|||
|
|||
|
RE: On-Line Catalog
|
|
#3
|
|||
|
|||
|
RE: On-Line Catalog
Thanks a lot!!! I'm fairly new to this, and like it a lot. That was the fastest most helpful come back I've ever gotten. Thanks again,
Dean |
|
#4
|
|||
|
|||
|
RE: On-Line Catalog
Ok most of it seems to be working... some trial and error, which makes me learn. However, as a test I put an echo $start at the end of your design, and it equaled zero. Where in the code does $start get set to 10, or another value? Also the url generated by $start+10 is
?start=0+10. Is that right? or is it supposed to be getting the value of that which is just 10? Again any help would be great... Dean |
|
#5
|
|||
|
|||
|
RE: On-Line Catalog
|
|
#6
|
|||
|
|||
|
RE: On-Line Catalog
the url should be getting the value of that which would be 10...
|
|
#7
|
|||
|
|||
|
RE: On-Line Catalog
sorry i don't think i understand the question.
|
|
#8
|
|||
|
|||
|
RE: On-Line Catalog
if($numrows>($start+10)) $display_footer .= "<a href="$PHP_SELF?start=$start+=10">Next</a> $start" ;
Generates... <a href="/hollywood.php3?start=0+=10">Next</a> 0 I've tried adding quotes, escaping characters... I'm at a loss. The final $start in my code is to test the value, which came up as you can see, after the link code as a zero. How do I force it to add the $start and the 10? Again all help is appreciated, Dean |
|
#9
|
|||
|
|||
|
RE: On-Line Catalog
|
|
#10
|
|||
|
|||
|
RE: On-Line Catalog
or even...
if($numrows>($start+10)) $display_footer .= "<a href="$PHP_SELF?start=" . $start+=10; . "">Next</a> $start"; hmm.. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > On-Line Catalog |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|