vanvoquan Posted June 1, 2008 Share Posted June 1, 2008 I have spent 3 weeks to search and put the code together but there is no hope. I'm using Oscommerce script and I want to write the search function like this page Search by Vehicle. This is how my categories and subcategories, sub-subcategories look like: Categories Subcategories Sub-subcategories Subsubcategories Honda |----> 2005 |----------> Accord |-------------->Bumper And my database as follow: table categories categories_id parent_id ------------- ---------- 56 0 57 56 59 57 60 59 Table categories_description categories_id categories_name ------------- --------------- 56 Honda 57 2005 59 Accord 60 Bumper I want to write a script that have the search function like the website above. If anyone out there experience with this stuff please help me. I will thank you million times Vanvoquan Link to comment https://forums.phpfreaks.com/topic/108200-unexperience-need-help-with-code-please-help/ Share on other sites More sharing options...
Barand Posted June 1, 2008 Share Posted June 1, 2008 I'd set up 3 dropdowns Make, Year, Model Using AJAX, when an ID is selected in one, populate the next with its immediate sublevels. When the final one is selected, populate a main page area with parts links. Sample in my sig. Link to comment https://forums.phpfreaks.com/topic/108200-unexperience-need-help-with-code-please-help/#findComment-554709 Share on other sites More sharing options...
vanvoquan Posted June 1, 2008 Author Share Posted June 1, 2008 Hi Barand, Thanks million times for helping me with topic. I follow your instructions, study the BaaSelect thing and then write the code for the whole day but it didn't work. I'm so disappionted. Can you please please please help me write this little code. Thanks so much. Vanvoquan Link to comment https://forums.phpfreaks.com/topic/108200-unexperience-need-help-with-code-please-help/#findComment-555098 Share on other sites More sharing options...
Barand Posted June 1, 2008 Share Posted June 1, 2008 For this one I'd have gone for the AJAX link in my sig Link to comment https://forums.phpfreaks.com/topic/108200-unexperience-need-help-with-code-please-help/#findComment-555166 Share on other sites More sharing options...
vanvoquan Posted June 2, 2008 Author Share Posted June 2, 2008 Thanks for reply Barand. Now I got it but I still have a small problem. When I chose the model from the second dropdown I want it take me to my index.php. I noticed that when I click categories and then subcategories through my site menu, I got the URL like this : http://localhost/test/index.php?cPath=56_57&osCsid=9d1a062764c50509a73c7d6dd9d56806 56 is my categories_id and 57 is my subcategories_id. They are connect together by an underline. Is there anyway we can make the form action to something like this <form action="index.php?cPath='$categories_id' ."_". '$subcategories_id'"> Thanks you so much for helping me out vanvoquan Link to comment https://forums.phpfreaks.com/topic/108200-unexperience-need-help-with-code-please-help/#findComment-555243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.