i have a simple mysql script , the basics is

SELECT * FROM products,makes WHERE makes.makeid=products.makeid && makes.makeid = '5'

how do i make a php script that lets me change the value of 5. am thinking a screen where i have bullet points and i select the number and press submit and then all the results are shown, any help would be great. thanks

    Well PHP provides a very good interface to MySQL. Any and all functions for database connections and query execution are provided.

    As far as getting the value for "makeid" the best way would be a form. Radio buttons should work just fine. Depending on your PHP settings how you refer to those variables differs. If you're using register globals you'll need to use HTTP_POST, etc.

      Make a form ...

      <FORM ACTION="myscript.php" METHOD="post">
      <INPUT TYPE="radio" NAME="choice" VALUE="1">
      <INPUT TYPE="radio" NAME="choice" VALUE="2">
      <INPUT TYPE="submit">

      then on your "myscript.php" page, which has the SQL in it ...

      SELECT * FROM products,makes WHERE makes.makeid=products.makeid && makes.makeid = ' $_POST['choice']'

        Write a Reply...