Hi Everyone,
I am a newbie to php and mysql and I am trying desperately to create a dynamic product search page.
It's a 6 step search menu, where first drop-down menu selection affects the second drop-down menu selection affects the third and so on (All of the menus items/arrays if nec. need to be database driven)...
My menu items are as follows: Product Line/ Capacity / Thread / Style / Material / Color
In addition I need to show the results of the search (which will also be pulled from the same database) in a list box on the right.
For example: If the user selects Plastic Jars from the Product Line menu, the Capacity Menu will then update to show all of the capacities that are available for plastic jars. In addition, the list box on the right will show a brief description of all of the Plastic Jars offered (one line per jar). The user will then have the option to narrow the search futher using the menu on the left or choose the items they are looking for from directly from the list box on the right. The list box items need to be somehow linked so that after a user makes there selection and presses the view products button it takes them to a summary page where the information that they have chosen is expanded upon with a pix etc. Like a product cataolg...
The way that my database is currently set up, the description that needs to appear in the results box is a combination of several fields in the same table. Is this a problem or do I need to create an additional field called description?
I can figure out how to make the drop down fields work using static arrays and the onchange () function, but I can not for the life of me figure out how to incorporate :
echo("<SELECT name=\"PRODLINE\"><option>
\n");
$resultset = mysql_query("select * from Jars") or die(mysql_error());
while($event = mysql_fetch_array($results
et))
{
echo("<option value=\"".$event['PRODLINE
']."\">".$
event['PRO
DLIN']."\n
");
}
echo("</select>\n");
?>
into to the onchange () command so that it all works dynamically. I also don't know how to combine fields in a table to come up with a new variable 'Description'
I hope this all makes sense?!?! :) I would REALLY appreciate any help you could give me!!!!!!!!!!! :/ Thank you so much!
~k
My Table Structure (if it's important) is:
Product Line: Product Line / Product Line ID
Capacity: Capacity / Capacity ID
Thread: Thread / Thread ID
Style: Style / Style ID
Material: Material / Material ID
Color: Color / Color ID
Products: Product Line ID/Capacity ID/Style ID/Material ID/Item/Prodline/capacity/
thread/sty
le/materia
l/color/un
it cost/cost under 10M/cost 10- 25M etc....