Results 1 to 3 of 3

Thread: PHP MYSQL database

  1. #1
    Join Date
    Jul 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb PHP MYSQL database

    Hey everyone, i'm looking for a bit of help, i am new to MYSQL, and trying to figure something out, if it is possible at all.

    I have a MYSQLADMIN database active with all of my criteria, i am trying to make it so that the users of my website can select radio buttons from a form, the value of those radio buttons will then force the MYSQL database to search for entries that fit into all of those categories.

    Basically i want the value of the radio buttons selected to be entered into the
    SELECT * FROM "table name" WHERE "table entry" = "VALUE of THE RADIO BUTTON"

    Thanks in advance for your help everyone.

    -jake

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Hmm... I'm not sure if it can be done client-side, but some server interaction has to take place.
    A radio button can be read through a form with the method "post" like so:
    Code:
    $value = $_POST["radioname"];
    - Mike

  3. #3
    Join Date
    May 2007
    Location
    England, UK
    Posts
    235
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default

    all you need to do then is use the variable in the query

    e.g.
    PHP Code:
    $value $_POST["radioname"];

    $query "SELECT * FROM tablename WHERE tableentry='$value'"

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
  •