title: Form submission shows the result after the second page refresh only in PHP
body: <p>I created a form where as soon as I click on the input of the submit, it writes me a value on the column to the database table.</p>
  
  <p>So far everything is fine, but when the current page reloads, I can't see the result that was written to the database.<br>
  I can only see the result if I submit the form for the second time on the same page.</p>
  
  <p>My code:  </p>
  
  <pre><code>&lt;?php 
  $increId = $_order-&gt;getRealOrderId();
  $pathAss = 'My file';   
  $connectionresource = Mage::getSingleton('core/resource');
  $connectionWrite = $connectionresource-&gt;getConnection('core_write');
  
  
  $table = 'sales_flat_order';
  $query = "UPDATE ".$table." "
         . "SET upload_file_1='" . $pathAss . "'"
         . " WHERE increment_id='".$increId."'";
  
  $connectionWrite-&gt;query($query); 
  ?&gt;
  
  &lt;form id="abbLogoOrder" action="" method="post" enctype="multipart/form-data"&gt;
      &lt;a href="&lt;?php echo $_order-&gt;getupload_file_1(); ?&gt;" 
         title="&lt;?php echo basename($_order-&gt;getupload_file_1()); ?&gt;"&gt;
          &lt;?php echo basename($_order-&gt;getupload_file_1()); ?&gt;
      &lt;/a&gt; //THIS VALUE RETURNS EMPTY AFTER FIRST SUBMIT FORM
  
      &lt;b&gt;
      &lt;?php 
      /* $testget = ['getupload_file_'.$count.'()'];
      echo $_order-&gt;$testget;  */
      ?&gt;
      &lt;/b&gt;
  
      &lt;div class="upload-btn-wrapper"&gt;
          &lt;button class="btn" style="font-size:13px;"&gt;SELECT YOUR FILES&lt;/button&gt;
          &lt;input type="file" name="abbFile&lt;?php echo $count; ?&gt;[]" id="abbFile&lt;?php echo $count; ?&gt;" multiple="multiple" /&gt;         
          &lt;input type="submit" value="SEND" /&gt;    
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>