MySQL: Getting data via a form

Discussion in 'Programming/Scripts' started by flameproof, Sep 12, 2009.

  1. flameproof

    flameproof New Member

    I have a simple static mysql DB and I like to display filtered data, so that a user can filter for certain data.

    When I write the php like that I get the desired result:

    $query="SELECT * FROM ccl WHERE thick >= [B]1[/B] AND thick <= [B]2[/B] ORDER BY thick, width ASC";

    However, I like the use to input min/max numbers via a form. How can I do that?

    Any link to a page that explains simple php form handling is appreciated too.
  2. falko

    falko Super Moderator ISPConfig Developer

    If the form uses action="GET", then the values of the form are in the $_GET array; if you use action="POST", the values are in the $_POST array.
  3. flameproof

    flameproof New Member

    Thanks for the hint.

    In the meantime I played a lot around the script. I found 2 nice freeware tools which I like to share, at least for those with limited php knowledge:


    This one creates php forms online. But that's only for input forms, or to create forms, not to search or browse them.

    PHP Generator for MySQL (not free, but 30 days full function trial)

    This finally can do everything. I guess this output I can change to what I actually want.
    Last edited: Sep 16, 2009

Share This Page