close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search within a Search

Thread began 3/15/2010 1:24 pm by elewis93815 | Last modified 3/16/2010 1:51 am by anonymous | 505 views | 1 replies |

elewis93815

Search within a Search

We have created a search function that lists a persons name, contact information, and a product line that the particular person carries. Our search works great, however, we would like to know if when the search comes back, if it is possible to have the name or product line linked so that when you click on either one of them, they conduct another search. For example, if Bonny Jones carrries "ABC clothing" and you are able to click on "ABC clothing" you will find anyone else carrying "ABC clothing" Is this possible and if so, how would we go about that? We are novices and would greatly appreciate any assistance.
The website is: www.northstarfashion.com if you conduct a general search, you'll see what we are talking about.

Thank you very much for your help!

Jackie or Erick

Sign in to reply to this post

anonymous

It's doable but would require a little hand coding.

The overview looks like this:

First you would need to create a link to the dynamic results for the products themselves.

If the your results for products in each result, for example, were $row_variable['clothingcompany'], I would create your link like this:

<a href="clothingmfr.php?co=<?php echo $row_variable['clothingcompany']; ?>"><?php echo $row_variable['clothingcompany']; ?></a>

What I have done above is create link using an arbitrary page and variable that you would use in the next step. As you can guess, clothingmfr.php was what I chose to be the name of the page I would create that would be for refined searches of clothing manufacturers. I then created a URL variable that will contain the manufacturers name based on what was binded from the recordset.

The next step would be to create your clothingmfr.php page.

At the top, you would then want to first simplify by your life by storing the URL variable into another variable like this:

<?php if (isset($_GET['co']) && $_GET['co'] != "") {
$company = $_GET['co'];
}
?>

This will first see if there is a URL variable and will check that it has a value. If it does, it will then store the URL variable into the variable named $company. Note, I chose co for my URL variable to represent company.

The next step would be to get the results of all manufacturers that carry that company.

This would be a simple recordset where you select all retailers using the MySQL like command.

This would look something like this (I am leaving out much of query variable needs and just showing the query itself):

SELECT retailers, anyOtherColumns FROM yourTable WHERE clothingCompany LIKE '$company'

The last part would be to loop through your results in your page.

Regards,

Brian

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...