0

I have a form in that we have a drop down list ( apple, gova, lemon .. ) each one has some counter like apple =5, gova=3, lemon=6. If i select apple at first then count of apple becomes apple=4, suppose i want to change my selection from drop down list lemon, now lemon should become 5 and apple=5. how to do that ?

code :
           <select>
           <option>apple </option>
            <option>gova </option>
            <option>lemon</option>
            ..
            ..
            </select>

note : these list of fruits im getting from a table called fruits of mysql.

    table schema : fruit_table

     apple  gova lemon ... etc
      5      3     6    .....

in advance,thanks for your comments and solutions that you have given.

4

1 回答 1

0

仅当用户提交表单时才减小该值。不是当他改变他的选择选项时。

将fruit_table 模式列更改为:fruit_name、count。从您的示例来看,列名似乎是水果名称

于 2013-11-06T05:57:38.253 回答