two emails in the same file php
<p>I have a php file with two different forms, both forms are for different recipients but when one of the two forms was submited the two forms fired submit, I want to avoid that, i want to submit only the form that is clicked the other one not.</p>

<p>This is my code:</p>

<pre><code>&lt;section id="contacto"&gt;
    &lt;div class="donveloz"&gt;&lt;/div&gt;
    &lt;div class="container"&gt;
      &lt;h3&gt;Inscribe tu e·commerce&lt;/h3&gt;
      &lt;p&gt;Da el siguiente paso para tu negocio.&lt;/p&gt;
      &lt;?php
$action=$_REQUEST['action'];
if ($action=="")    /* display the contact form */
    {
    ?&gt;
      &lt;form action="" method="POST" enctype="multipart/form-data" name="limpio"&gt;
          &lt;input type="hidden" name="action" value="submit"&gt;
        &lt;input class="name" type="text" name="nombre" placeholder="Nombre" required/&gt;
        &lt;input class="email mitad" type="email" name="email" placeholder="Email" required/&gt;
        &lt;input class="phone mitad derecha error" type="phone" name="telefono" placeholder="Teléfono" required/&gt;
        &lt;input class="negocio" type="text" name="ecommerce" placeholder="Nombre de tu e-commerce"/&gt;
        &lt;input class="submit" name="submit" type="submit" value="Envia tu información" id="submit"/&gt;
      &lt;/form&gt;
       &lt;?php
    } 
else                /* send the submitted data */
    {
    $name=$_REQUEST['nombre'];
    $email=$_REQUEST['email'];
    $phone=$_REQUEST['telefono'];
    $commerce=$_REQUEST['ecommerce'];
    $subject="Nuevo ecommerce registrado";
// PREPARE THE BODY OF THE MESSAGE

      $message = '&lt;html&gt;&lt;body&gt;';
      $message .= '&lt;table rules="all" style="border-color: #666;" cellpadding="10"&gt;';
      $message .= "&lt;tr style='background: #eee;'&gt;&lt;td&gt;&lt;strong&gt;Name:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['nombre']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Email:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['email']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Telefono:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['telefono']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Ecommerce:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['ecommerce']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;/table&gt;";
      $message .= "&lt;/body&gt;&lt;/html&gt;";
      $headers = "From:postulaciones@99minutos.com\r\n";
      $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";



    mail("victor@99minutos.com", $subject, $message,$headers);
    //MESSAGE SHOW WHEN FORM IS SUBMITTED
    echo 'Gracias por registrar tu informacion, en breve nos comunicaremos contigo';

    }  
?&gt;
    &lt;/div&gt;
  &lt;/section&gt;

  &lt;footer&gt;
    &lt;div class="container"&gt;  
      &lt;h4&gt;
        &lt;img src="img/icono99minutos.svg" alt="99minutos"&gt; The fastest shipping &lt;span&gt;for online shopping&lt;/span&gt;
      &lt;/h4&gt;
      &lt;nav&gt;
        &lt;ul class="izq"&gt;
          &lt;li&gt;&lt;a href="bolsa.php"&gt;Bolsa de trabajo&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="faq.html"&gt;FAQs&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://precise-line-76299minutos.appspot.com/2/delivery/client/login"&gt;Iniciar Sesión&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a class="boton" href="rastreo.html"&gt;Rastrea tu Envío&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a class="boton" href="#loginmodal" id="modaltrigger"&gt;Conviértete en un Don Veloz&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;ul class="der"&gt;
          &lt;li&gt;&lt;img src="img/email.png" alt=""&gt;envios@99minutos.com&lt;/li&gt;
          &lt;li&gt;&lt;img src="img/phone.png" alt=""&gt;(52) 55 6363·1559&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
    &lt;/div&gt;

    &lt;div id="loginmodal" style="display:none;"&gt;
    &lt;h1&gt;Se un Don Veloz&lt;/h1&gt;
    &lt;?php
    $action=$_REQUEST['action'];
    if ($action=="")    /* display the contact form */
    {
    ?&gt;
    &lt;form action="" method="POST" enctype="multipart/form-data" name="limpio"&gt;
        &lt;input type="hidden" name="action" value="submit"&gt;
        &lt;label for="username"&gt;Nombre:&lt;/label&gt;
        &lt;input class="name" type="text" name="nombre" placeholder="Nombre" id="lineanombre" required/&gt;&lt;br&gt;
        &lt;label for="username"&gt;Correo:  &lt;/label&gt;
        &lt;input class="email mitad" type="email" name="email" placeholder="Email" id="lineacorreo" required/&gt;&lt;br&gt;
        &lt;label for="username"&gt;Telefono:&lt;/label&gt;
        &lt;input class="phone mitad derecha error" type="phone" name="telefono" placeholder="Teléfono" id="lineatelefono" required/&gt;
        &lt;!--&lt;input class="negocio" type="text" name="ecommerce" placeholder="Nombre de tu e-commerce"/&gt;--&gt;
        &lt;input class="submit" name="submit" type="submit" value="Envia tu información" id="btnn" onClick="submitForm()"/&gt;
      &lt;/form&gt; 

    &lt;?php
    } 
else                /* send the submitted data */
    {
    $name=$_REQUEST['nombre'];
    $email=$_REQUEST['email'];
    $phone=$_REQUEST['telefono'];
    $commerce=$_REQUEST['ecommerce'];
    $subject="Nuevo Aspirante a Don Veloz libre";
// PREPARE THE BODY OF THE MESSAGE

      $message = '&lt;html&gt;&lt;body&gt;';
      $message .= '&lt;table rules="all" style="border-color: #666;" cellpadding="10"&gt;';
      $message .= "&lt;tr style='background: #eee;'&gt;&lt;td&gt;&lt;strong&gt;Name:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['nombre']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Email:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['email']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Telefono:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['telefono']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Ecommerce:&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;" . strip_tags($_REQUEST['ecommerce']) . "&lt;/td&gt;&lt;/tr&gt;";
      $message .= "&lt;/table&gt;";
      $message .= "&lt;/body&gt;&lt;/html&gt;";
      $headers = "From:postulaciones@99minutos.com\r\n";
      $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";



    mail("envios@99minutos.com, yesenia@99minutos.com", $subject, $message,$headers);
    echo "Gracias por registarte en breve recibiras un correo";
}

?&gt;



  &lt;/div&gt;

  &lt;/footer&gt;
</code></pre>

<p>I use this script for submit the form only one time:</p>

<pre><code>onsubmit="document.getElementById('submit').disabled = true";
</code></pre>