CrazyEngineers
  • hbk
    hbk

    MemberJul 2, 2008

    Retrieving drop-down-menu data

    hey guys.

    this may be very trivial, but i cant figure out a way...

    i want to retrieve the data entered by the user through a drop-down-menu using POST method.

    I am unable to do so...

    kindly suggest

    P.S. I am how to retrieve text-field data from a form, but not drop-menus....

    thx...
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Prasad Ajinkya

    MemberJul 3, 2008

    Its the same way hbk. In PHP, you rerieve only the value field of selected item in the drop down box.

    So lets say, if the dropdown box have a following dropdown box
    <select name="yourBox">
    <option value="1">A</option>
    <option value="2">B</option>
    <option value="3">C</option>
    <option value="4">D</option>
    </select>
    , then when you select C and submit, you can access $yourBox as you would for your text inputs, and the value of the same would be 3.

    Capisce?
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register