title: How do I redirect a form after submission to the same page?
body: <p>I want my form to be submitted, after submitting that values it should redirect to the form and display the values. I've tried many things... but no luck yet... 
  So I've decided to post here. It should be like most of the edit fields, the stored value or the submitted value should appear.<br>
  This is my code: </p>
  
  <pre><code>&lt;form method="post" name="contentUpload" action="insertContent.php" enctype="multipart/form-data"&gt;    
      &lt;table&gt;
          &lt;tr id="small"&gt;
              &lt;td&gt;Category&lt;/td&gt;
              &lt;td&gt;
                  &lt;select name="contentCategory"&gt;
                      &lt;&lt;option value="1"&gt;World&lt;/option&gt;
                          &lt;option value="2"&gt;Health/Env/Scn&lt;/option&gt;
                          &lt;option value="3"&gt;Travel&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr id="small"&gt;
              &lt;td&gt;Title&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text" name="contentTitle" size="80"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr id="small"&gt;
              &lt;td&gt;Writer&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text" name="writer" size="80"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr id="small"&gt;
              &lt;td&gt;Upload Picture&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="file" name="fileToUpload" id="fileToUpload"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td id="small"&gt;Display Mode&lt;/td&gt;
              &lt;td required&gt;
                  &lt;input type="radio" name="status" value="Online" /&gt; Online
                  &lt;input type="radio" name="status" value="Offline" /&gt; Offline
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td id="small"&gt;Final Submission&lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="submit" name="submitContent" value="Update"&gt;
                  &lt;input type="reset" name="resetContent" value="Reset"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>this is my addcontent.php</p>
  
  <pre><code>&lt;?php include ( "./inc/connect.inc.php" ); ?&gt;
  &lt;?php
  session_start();
  $target_dir = "new/Images/";
  $file_name = $_FILES["fileToUpload"]["name"];
  $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
  $uploadOk = 1;
  $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
  if(isset($_POST["submitContent"])) 
  {
  $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
  if($check !== false) 
  {
  echo "File is an image - " . $check["mime"] . ".";
  $uploadOk = 1;
  } 
  else 
  {
  echo "File is not an image.";
  $uploadOk = 0;
  }
  }
  // Check if $uploadOk is set to 0 by an error
  if ($uploadOk == 0) 
  {
  echo "Sorry, your file was not uploaded.";
  // if everything is ok, try to upload file
  } 
  else 
  {
  if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) 
  {
  echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";
  } 
  else 
  {
  echo "Sorry, there was an error uploading your file.";
  }
  }
  if (isset($_POST['submitContent']))
  {
  $eid = $_SESSION['employeeId'];
  $contentCategory = $_POST['contentCategory'];
  $contentTitle = $_POST['contentTitle'];
  $contentWriter = $_POST['writer'];
  $displayMode = $_POST['status'];
  $query = mysqli_query($con,"INSERT INTO contentdetails(employeeId,contentCategory,contentTitle,contentWriter,photo,displayMode,published_on) 
  VALUES('$eid','$contentCategory','$contentTitle','$contentWriter',
  '$file_name','$displayMode',NOW())");
  }
  ?&gt;
  </code></pre>