i want to fill up the text boxes with the data from the database vales. But at the same time it should display the values according to the static drop down value selected. I am not getting how to achieve this. Here is my code

<form name="form1" action="submit.php" method="post">
  <tr bgcolor="#00BFFF">
    <td><strong>Month</strong></td>

  </tr>
  <tr>
    <td>
    <select name="month"><option value="january">January</option>
    <option value="february">February</option>
    <option value="march">March</option>
    <option value="april">April</option>
    <option value="may">May</option>
    <option value="june">June</option>
    <option value="july">July</option>
    <option value="august">August</option>
    <option value="september">September</option>
    <option value="october">October</option>
    <option value="november">November</option>
    <option value="december">December</option>
    </select>
    </td>
    <td><input type="text" name="day1" id="day1" style="width:87%;" /></td>
    <td><input type="text" name="day2" id="day2" style="width:87%;" /></td>
    <td><input type="text" name="day3" id="day3" style="width:87%;" /></td>
    <td><input type="text" name="day4" id="day4" style="width:87%;" /></td>
    <td><input type="text" name="day5" id="day5" style="width:87%;" /></td>
    <td><input type="text" name="day6" id="day6" style="width:87%;" /></td>
    <td><input type="text" name="day7" id="day7" style="width:87%;" /></td>
    <td><input type="text" name="day8" id="day8" style="width:87%;" /></td>
    <td><input type="text" name="day9" id="day9" style="width:87%;" /></td>
    <td><input type="text" name="day10" id="day10" style="width:87%;" /></td>
    <td><input type="text" name="day11" id="day11" style="width:87%;" /></td>
    <td><input type="text" name="day12" id="day12" style="width:87%;" /></td>
    <td><input type="text" name="day13" id="day13" style="width:87%;" /></td>
    <td><input type="text" name="day14" id="day14" style="width:87%;" /></td>
    <td><input type="text" name="day15" id="day15" style="width:87%;" /></td>
    <td><input type="text" name="day16" id="jan16" style="width:87%;" /></td>
    <td><input type="text" name="day17" id="day17" style="width:87%;" /></td>
    <td><input type="text" name="day18" id="day18" style="width:87%;" /></td>
    <td><input type="text" name="day19" id="day19" style="width:87%;" /></td>
    <td><input type="text" name="day20" id="day20" style="width:87%;" /></td>
    <td><input type="text" name="day21" id="day21" style="width:87%;" /></td>
    <td><input type="text" name="day22" id="day22" style="width:87%;" /></td>
    <td><input type="text" name="day23" id="day23" style="width:87%;" /></td>
    <td><input type="text" name="day24" id="day24" style="width:87%;" /></td>
    <td><input type="text" name="day25" id="day25" style="width:87%;" /></td>
    <td><input type="text" name="day26" id="day26" style="width:87%;" /></td>
    <td><input type="text" name="day27" id="day27" style="width:87%;" /></td>
    <td><input type="text" name="day28" id="day28" style="width:87%;" /></td>
    <td><input type="text" name="day29" id="day29" style="width:87%;" /></td>
    <td><input type="text" name="day30" id="day30" style="width:87%;" /></td>
    <td><input type="text" name="day31" id="day31" style="width:87%;" /></td>
    <input type="hidden" name="pid" value="<?php echo $product_id ?>"/>
  </tr>
  <tr><td colspan="32" align="center"><input type="submit" value="SUBMIT DATA" name="submit" style="font-size:18px; font-weight:bold;"  /></td></tr>

  </form>
</table>

In this page, it should populate the text box values fetching from the database according to the month selected.
I am not getting how to do it using javascript/ajax. plz help me

Perhaps this code snippet may help.

i did not get that :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.