Change posted variable
Posted: Fri May 18, 2007 6:03 pm
Hi,
I have a few select boxes to collect the chosen time via post:
Once the form is posted, if pm is selected I need to so it changes the posted hour value to 24 hour time:
example
if 1 is selected make it 13
if 2 is selected make it 14
if 3 is selected make it 15
etc etc
Cheers
etc etc
I have a few select boxes to collect the chosen time via post:
Code: Select all
<select name="hour">
<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>
</select>
<select name="minute">
<option value="00">00</option>
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="50">50</option>
</select>
<select name="ampm">
<option value="am">Am</option>
<option value="pm">Pm</option>
</select>example
if 1 is selected make it 13
if 2 is selected make it 14
if 3 is selected make it 15
etc etc
Cheers
etc etc