I want a textbox to be automatically filled in

Hi,

Hopefully this makes sense but I what I want to happen is that when I select the date through the drop down menus for day, month and year, I want the semester textbox to automatically fill in the semester depending on the date chosen.

e.g. If the user chose the date 23rd June 2012 from the drop down menus, then the semester textbox below should automatically be filled in with the semester ‘Summer’. Is this actually possible in php?

Below is the dates and semester:

1st September - 30th November = Autumn
1st December - 28th February = Winter
1st March - 31st May = Spring
1st June - 30th August = Summer

Below is my form:

<form action="create_session.php" method="post">
            <table>
            <tr>
            <th>Date:</th>
            <td>Day</td>
            <td><select name="day" class="daysDrop">
            <option value=""></option>
			<option value="1">1</option>
			<option value="2">2</option>
			<option value="3">3</option>
			<option value="4">4</option>
			<option value="5">5</option>
			<option value="6">6</option>
			<option value="7">7</option>
			<option value="8">8</option>
			<option value="9">9</option>
			<option value="10">10</option>
			<option value="11">11</option>
			<option value="12">12</option>
			<option value="13">13</option>
			<option value="14">14</option>
			<option value="15">15</option>
			<option value="16">16</option>
			<option value="17">17</option>
			<option value="18">18</option>
			<option value="19">19</option>
			<option value="20">20</option>
			<option value="21">21</option>
			<option value="22">22</option>
			<option value="23">23</option>
			<option value="24">24</option>
			<option value="25">25</option>
			<option value="26">26</option>
			<option value="27">27</option>
			<option value="28">28</option>
			<option value="29">29</option>
			<option value="30">30</option>
			<option value="31">31</option>
			</select></td>
			<td></td>
            <td>Month</td>
            <td><select name="month" class="monthsDrop">
            <option value=""></option>
			<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></td>
            <td>Year</td>
            <td><select name="year" class="yearsDrop">
            <option value=""></option>
			<option value="2012">2012</option>
			<option value="2013">2013</option>
			</select></td>
            </tr>
            </table>
            <p><strong>Semester:</strong> <input type="text" name="semester"></p>      <!-- Enter Semester here-->
        </form>

I think you’d need JavaScript for this. A page has to be resubmitted (run through the server) for PHP to make a change to it … unless perhaps you are using AJAX, but that usually involves some mix of JavaScript or similar.