populating a drop down list

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 29, 2008   (RSS)

By Chris_t - February 28, 2008

Hey Dave, well now that I have the categories list working I am feeling pretty cocky.

Let see if I can do this, the clients wants a drop down list of all the business that are listed in the coupon menu so we have a title field in the coupon menu with there name and we need to link it to there couponPage.php any thoughts would be great.

I came into work today sick and not wanting to work but after getting the menu to work so fast I feel a whole lot better [:)] Thanks Dave.

Re: [Dave] populating a drop down list

By Chris_t - February 29, 2008 - edited: February 29, 2008

Thanks Dave, I have the list being populated and built now just 2 questions.

1. can I set it to display all listings on one page insted of telling it a number per page.

2. The search is going to the page view not list view and doing it by title is not working would num work for this.


<form method="get" action="couponPage.php">
<select name="">
<?php foreach ($listRows as $record): ?>
<option value="<?php echo $record['title'] ?>-<?php echo $record['num'] ?>"> <?php echo $record['title'] ?> </option>
<?php endforeach ?>
</select> <input type="submit" value="Search"> </form>





I can get really close but the link it makes says

http://clikquikcoupons.com/proof/couponPage.php?=AAMCO-2
when it should read
http://clikquikcoupons.com/proof/couponsPage.php?AAMCO-2/

any ideas



Edit found the problem was a typo ugh but my first questions still stands how can I make sure all listings will always be displayed
Thanks Dave you and your php skills rock

Chirs

Re: [ChrisTitchenal] populating a drop down list

By Dave - February 29, 2008

Glad to hear it's working now!

>1. can I set it to display all listings on one page
>instead of telling it a number per page.

Just set the perPage to a high number, pageNum to 1, and remove the prev/next buttons. So you're options for those might look like this:

$options['perPage'] = '100000';
$options['pageNum'] = '1';


Would that work for what you need?
Dave Edis - Senior Developer
interactivetools.com