Jump to content

2 Questions dealing with Mysql! Almost done please help!


Deanznet

Recommended Posts

 

First Question

 

I have a database setup

 

Id Item  Cat1      Cat2

2  Shirt  offroad  gloves

 

Something along those lines

 

Now i want to be able to have 2 select boxes like this

 

phpfreaks.png

 

and when you click on the second one it will automatically search the Mysql records something that has offroad in cat1 and what ever you select in the other box for cat2

 

Help Please? Ha

 

Here is my second question. a little different db setup

 

Id Item  Cat1      Cat2    cost    retail

2  Shirt  offroad  gloves  $1.99

 

Now i have php page i made to add this but i want to say lets if im putting the item in the glove category i would want to add 20% to the 1.99 and put that in the retail row but if i stock it in maybe the hat category i might want to add 40% understand?

 

Any idea how?

 

Link to comment
Share on other sites

You would need to use javascript/ajax to perform the search and return the results in a div id. Assign some keywords to the catgory 1 select menu and when clicked on it searches the database for the keywords ie in your case glove, and returns the results in the div id you specify.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.