title: Stay on current page after submit button in YII Framework
body: <p>I am trying to submit a form , after form submition the current page should stay on with user entered datas . how to achieve this ?</p>
  
  <pre><code>public function actionUpload()
      {
  
         $model=new UploadModel();
         $basemodel=new BaseContactList();
         $importmodel=new ImportedFilesModel(); 
  
  
          $importmodel-&gt;name =$basemodel-&gt;name;  
          $importmodel-&gt;import_date = $now-&gt;format('Y-m-d H:i:s');
          $importmodel-&gt;server_path = $temp;
          $importmodel-&gt;file_name = $name;
          $importmodel-&gt;crm_base_contact_id = $crm_base_contact_id;
  
          if ($importmodel-&gt;save())
              echo "Import saved";
          else 
              echo "Import Not Saved";
          unset($_POST['BaseContactList']);    
          $this-&gt;redirect(Yii::app()-&gt;request-&gt;urlReferrer);
  
      }
  </code></pre>
  
  <p>This line <code>"$this-&gt;redirect(Yii::app()-&gt;request-&gt;urlReferrer);"</code> goes to previous page but the user entered values are cleared . How to redirect to previous page without clearing the values in the form ??</p>