![]() |
Drop down menu
I need some help with a drop down menu I am trying to pull from the database.
What I am trying to do is generate a pull down menu from the brand field in the database based on if the categoryid on that same row as the brand matches the category currently being browsed. Here is my select tag Code:
<select name=brands> Hee is my php Code:
function brand_query() { If someone could please make some suggestions or give me a push in the right direction it would be much appreciated. I am going to keep working on it, and reading my php book. Thanks. |
take a look at one of my posts:
http://forum.x-cart.com/viewtopic.php?p=35218#35218 hope it helps you! |
thank you for your reply. I put in your code but still same with not result on the drop down. Only thing that pops up is result.
At the bottom of your post you mention the serach.php needs to be altered, how do you mean? I put the query in the serach.php but is there something else that needs to be altered that I am missing? I read through that topic too and tried a bunch of things but all came to the same result of no drop down being filled with the brand. |
OK I got the drop downs to generate finally and now I have a simple question that I cannot find the answer too.
IF I put the select tags on the advanced_search.tpl they generate fine. If I put the same tags on my custom specific_search.tpl they do not generate. It is using the same form tag so it should be calling to the same php file right? What I am guessing is there is a file somewhere that I did not active the tpl or maybe php file. Here is my customer/specific_search.php: Code:
<?php Here is my skin1/customer/main/specific_search.tpl: Code:
{* $Id: specfic_search.tpl,v 1.19 2003/04/15 06:23:26 svowl Exp $ *} I think its a matter of linking the tpl to the php but I cannot see the problem. Also I did name specific_search.tpl in the home_main.tpl. Like I said I know the code works but I think the linking is bad and I cannot find where. |
If someone could please post it would help me out alot.
Thanks. |
All times are GMT -8. The time now is 10:32 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.