The code which any form will call is specified in the "action" tag on the form. In your case, this is samepage.php. I'm guessing that the file which contains the forms, the file which should process form1 and the file which should process form 2 are all the same. In order for this to work, that file needs to understand how it is being called. One way of doing this is to have the code search for form-specific fields. For example:
if (isset($_POST["results"]){
// process form 2
}
if (isset($_POST["form1field"]){
// process form 1
}
This can get messy though. A more straightforward approach might be to have each form call a separate action (eg "f1handler.php", "f2handler.php") which silently process that form's input and then redirects back to the main page. While it may look more complicated, I find this solution more elegant, as it allows you to maintain single files for single tasks.