title: Running a PHP code when pressing a submit button in html while including the information added
body: <p>So, I have this submit button in my form that add the information needed to the array, however, when I open this page, it automaticlly add the information to my database(I'm using wordpress with plugin ACF with extension repeater).</p>
  
  <p>What I must do, is, instead of running my php script when opening the page, to only run it when I press the submit button and include the numbers added in the form.</p>
  
  <pre><code>            $timea = date(d);
              if($timea&lt;27)
                  {   
  
                      ?&gt;
                      &lt;form action="&lt;?php the_permalink(); ?&gt;" method="GET" enctype="multipart/form-data"&gt;
                          &lt;input type="number" name="cantpag" value="9"&gt;
                          &lt;input type="number" name="cantreinv" value="9"&gt;
  
                          &lt;input type="submit"&gt;
                      &lt;/form&gt;
                      &lt;?php
  
                      $arrayname = get_field('datos_especificos',$current_inv);
                      $arrayname[] = array(
                              'fecha'                         =&gt; 20140504,
                              'saldo'                         =&gt; 5,
                              'inversion_en_el_periodo'       =&gt; 5,
                              'interes_causado_en_el_periodo' =&gt; 5,
                              'cantidad_pagada'               =&gt; $_POST["cantpag"],
                              'cantidad_reinvertida'          =&gt; $_POST["cantreinv"],
                              'saldo_final'                   =&gt; 5
                          );
  
  
                      $field_key = "datos_especificos";
                      update_field($field_key, $arrayname, $current_inv);
  
                      ?&gt;
  
                      &lt;?php   
  
              }else{
                  ?&gt; &lt;p&gt;Cant do any changes after the 26th&lt;/p&gt; &lt;?php
              }
  </code></pre>