title: PHP, refresh page on insert
body: <p>this is the updating function:</p>
  
  <pre><code>public function update($id) {
          $id = $_GET['id'];
          $stmt9 = $this-&gt;conn-&gt;prepare("UPDATE users SET `name`= :name, `email`= :email WHERE `id` = :id");
  
  
          $stmt9-&gt;bindParam(':name', $this-&gt;name);
          $stmt9-&gt;bindParam(':email', $this-&gt;email);
          $stmt9-&gt;bindParam(':id' , $id, PDO::PARAM_INT);
          $stmt9-&gt;execute();
          if ($stmt9) {
             $message = "User updated Sussesfully!";
              header('location:');
          }else {
              header("location:");
          }
          }
      }
  </code></pre>
  
  <p>Now on update here i want the page to be refresh so i could see the updated data, but here now if it update it's will keep user in edite page, and will show the data of privous entered if i see in database the data has been updated and if i refresh the page with f5 it will show the on edit page is been update with out that when i submit the form it will get update but on the form it will show the prevouse data, </p>
  
  <p>so how i can make the page to get refresh after submitting. on redirection if if redirect to list page it will show that it's been updated, but here i want on mean time stay on edit page and reaload page so i could see the updated data.</p>
  
  <p>regards</p>