1个按钮Same Value 2个动作

I have 2 forms that i need to merge, so that i only have a searchbox and one submit button. Maybe this is simple but i just don´t know how to do it.

The forms :

<form action="http://www.wixfilters.com/Lookup/Exactmatch.aspx?" method="get" target="_blank">
    <input name="PartNo" type="text" value="" />
    <input type="submit" value="Procurar" />
</form>

<form action="https://catalog.cumminsfiltration.com/catalog/CatalogSearch.do?&quot;" method="get" target="_blank">
    <input name="partNumber_PartDeatils" type="text" value="" />
    <input type="submit" value="Procurar" />
</form>

The value to search is the same, example search for 24073.

Assuming the user doesn't need to go to the webpage you can use a cURL

for example make a form called submit.php in the same directory as your HTML file and change your form to this:

HTML FORM

<form action="submit.php" method="post" target="_blank">
<input name="partNumber_PartDeatils" type="text" value="" />
<input name="PartNo" type="text" value="" />
<input type="submit" value="Procurar" />
</form>

Then you submit.php file looks like this:

submit.php

<?php

$partNumber_PartDeatils = $_POST['partNumber_PartDeatils'];
$PartNo = $_POST['PartNo'];

$curl = curl_init();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_URL,"http://www.wixfilters.com/Lookup/Exactmatch.aspx");
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, "var1=$PartNo");

    curl_exec ($curl);
    curl_close ($curl);

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_URL,"https://catalog.cumminsfiltration.com/catalog/CatalogSearch.do?&quot");
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, "var2=$partNumber_PartDeatils");

    curl_exec ($curl);
    curl_close ($curl);

If you need to handle the response data form two external URLs you are going to struggle and perhaps need to reconsider your site architecture.

Another possible solution is to generate links to the same page that they then click.

For example:

EDIT: I don't know the GET format for the destination URLs so you'll have to edit those bits to suit. As long as you keep the variables written as ' . $var1 . ' inside the echo query you should be fine

<form action="" method="post">
<p>Cummins Filters:</p><input name="partNumber_PartDeatils" type="text" value="" />
<p>Wix Filters:</p><input name="PartNo" type="text" value="" />
<input type="submit" name="submit" value="Procurar" />
</form>

<?php
if (isset($_POST['submit'])){
$var1 = $_POST['partNumber_PartDeatils'];
$var2 = $_POST['PartNo'];
if (!empty($var2)){
echo '<p><a href="http://www.wixfilters.com/Lookup/Exactmatch.aspx?PartNo=' . $var2 . '">Wix Filters</a></p>';
}
if (!empty($var1)){
echo '<p><a href="https://catalog.cumminsfiltration.com/catalog/CatalogSearch.do?&quot=' . $var1 . '">Cummins Filtration</a></p>';
}
}
?>

For example: http://main.xfiddle.com/code_57622035.php