automatic individual search based on customPage.php

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 25, 2008   (RSS)

By Codee - April 24, 2008

Hi Dave and Co.,

On each record in Inventory the client has a field called "Dealer ID" which has a dealer's ID number. What we want on the produced record output pages is to have a predefined search attached to the dealer ID field or a "see the rest of this dealer's inventory" link. So when a visitor clicks on it, new search results (all the dealer's records) show up to the visitor. We want the search function prepopulated with that dealer's id so that it shows up automatically on each of the records displayed for that dealer. Does that make sense?

Thanks in advance!

Re: [equinox69] automatic individual search based on customPage.php

By Dave - April 24, 2008

Sure. If your field is called 'dealer_id' you should be able to display it with something like this:
<?php echo $record['dealer_id']; ?>

Next, you should be able to list all the inventory by a specific dealer by adding this to the url of the list page:
listPage.php?dealer_id=123

So if we combine those, it would look something like this:
<a href="listPage.php?dealer_id=<?php echo $record['dealer_id']; ?>">see the rest of this dealer's inventory</a>

Give it a try and let me know how it goes.
Dave Edis - Senior Developer
interactivetools.com