SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Cork, Ireland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a group of select boxes generated from MySQL on a page and when the user hits the submit button how do I get the selected values into PHP so that I can process them into a query.

    Help please????


    Ross

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Say your form contains the following select box:

    <SELECT NAME="myselect" SIZE=1>
    <OPTION VALUE=1>One
    <OPTION VALUE=2>Two
    <OPTION VALUE=3>Three
    </SELECT>


    When the form is submitted, the target PHP script (named in the ACTION attribute of the FORM tag) can access the selected value as $myselect.

    If this doesn't work, ensure that register_globals is set to On in your php.ini file.


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!


Bookmarks

Posting Permissions

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