提交按钮和document.Form.submit()处理不同的脚本

I am still new to PHP and are not sure what would be the right thing to look for to solve my problem.

I have created a form that has the the same php page entered in the action field. In a few fields I want to use the $_GET values to narrow down the options for the user so I used onchange="document.MyForm.submit();". That works all well but at the end I want to use a submit button that sends the $_GET values to a different php page for updating my data base

Example:

<?php
    $SQLe = "SELECT Distinct Product FROM `Product_Table`  
    ORDER BY `Products`";
    echo '<select name="Product" onchange="document.MyForm.submit();"><option value="">All</option>';
    $rese = mysql_query($SQLe);
    while($vale=mysql_fetch_array($rese)) 
    {
      echo '<option ';
      if ($user_product==$vale['Product'] )
      echo " selected ";  echo 'value="'.$vale['Product']'">'.$vale["Product"].'</option>
';
                                }
        echo '</select>  ?>

The next input field uses the $_GET['Program'] variable to pull from the database specific data for the selected product.

Following the idea to use AJAX would be the (best) solution. However it requires more effort. Also it might not be possible in all Environments. (A Customer, that cannot fill out a form, because of not working ajax requests is a gone customer :) )

to do this with plain PHP, you can simple tell the (automated) submits apart from the one, invoked by the button:

 if (isset($_POST["button_name"])){
    //button clicked
 }else{
    //autoinvoked.
 }

Now, the usal way would be to include your processing side, and maybe redirect afterwards, using header() when the user clicks the button.