Results 1 to 2 of 2

Thread: sending <option>s through PHP

  1. #1
    Join Date
    Oct 2012

    sending <option>s through PHP

    Good day to all.
    I have an issue that probably amounts to be a very simple solution, so I would appreciate any help.

    I have a form. In my form, there are certain <select> values that will generate a second set of <select> options, based on which original <option> was clicked. I then want to take both values and POST them into a MySQL database. Everything is fine, except for the second value never posts over to the process page, nor the database. Here is sample code.

    <select name="route">
    <option name="htoa" onclick="setFlights('hyatoack')">Hyannis to Nantucket</option>
    <option name="atoh" onclick="setFlights('acktohya')">Nantucket to Hyannis</option>
    <select id="hyatoackFlights" name="flightNumber" style="display: none;">
    <option name="0600">0600</option>
    <option name="0700">0700</option>
    <option name="0800">0800</option>
    <option name="0900">0900</option>
    <option name="1000">1000</option>
    <option name="1100">1100</option>
    <option name="1200">1200</option>
    <option name="1300">1300</option>
    <option name="1400">1400</option>
    <option name="1500">1500</option>
    <option name="1600">1600</option>
    <option name="1700">1700</option>
    <option name="1800">1800</option>
    <option name="1900">1900</option>
    <option name="2000">2000</option>

    <select id="acktohyaFlights" name="flightNumber" style="display: none;">
    <option name="0630">0630</option>
    <option name="0730">0730</option>
    <option name="0830">0830</option>
    <option name="0930">0930</option>
    <option name="1030">1030</option>
    <option name="1130">1130</option>
    <option name="1230">1230</option>
    <option name="1330">1330</option>
    <option name="1430">1430</option>
    <option name="1530">1530</option>
    <option name="1630">1630</option>
    <option name="1730">1730</option>
    <option name="1830">1830</option>
    <option name="1930">1930</option>
    (sorry to ramble) I hope I have made myself clear, and I hope moreso that this is a simple issue to resolve. Thank you in advance.

  2. #2
    Join Date
    Nov 2010
    hard to say, but maybe having the same name for both selects is causing the problem

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center