title: how to fetch the selected value of a drop down list to another drop down list
body: <p>I'm Developing a php file for performing 2 drop down list values. </p>
  
  <p>In my Drop down list, i have list of categories like Item1,Item2,Item3,Item4,...</p>
  
  <p>And in another drop down list i have sub categories for each categories in the 1st List as A, B,C,D,E,F,...</p>
  
  <p>My idea is, while changing the value of the 1st list, i need to pass the Value to the 2nd List...</p>
  
  <p>Which means, if i change the value in 2nd list, it must fetch the value which selected in the 1st list...</p>
  
  <p>The Sub category is same for all the Categories. But in my calculation, i used price for each category and sub-category..</p>
  
  <p>So,..</p>
  
  <p>Item 1 -> A = 100
  Item 2 -> A = 75
  Item 1 -> B = 198
  Item 2 -> B = 146
  Item 1 -> C = 160
  Item 2 -> C = 175</p>
  
  <p>I need to fetch the Selected item, to retrieve the amount for my calculation...</p>
  
  <p>How could i achieve this...</p>
  
  <pre><code>&lt;select name="Category1" size="1" id="Category1" &gt;
    &lt;option value="Item1"&gt;Item1&lt;/option&gt;
    &lt;option value="Item2"&gt;Item2&lt;/option&gt;
    &lt;option value="Item3"&gt;Item3&lt;/option&gt;
    &lt;option value="Item4"&gt;Item4&lt;/option&gt;
    &lt;option value="Item5"&gt;Item5&lt;/option&gt;
    &lt;option value="Item6"&gt;Item6&lt;/option&gt;
  &lt;/select&gt;
  &lt;select name="Category2" size="1" id="Category2" onchange=function()&gt;
    &lt;option value="A"&gt;A&lt;/option&gt;
    &lt;option value="B"&gt;B&lt;/option&gt;
    &lt;option value="C"&gt;C&lt;/option&gt;
    &lt;option value="D"&gt;D&lt;/option&gt;
    &lt;option value="E"&gt;E&lt;/option&gt;
    &lt;option value="F"&gt;F&lt;/option&gt;
    &lt;option value="G"&gt;G&lt;/option&gt;
    &lt;option value="H"&gt;H&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Here i need to fetch the selected value of Category1, in the function()...</p>