title: Submit form without refreshing
body: <pre><code>&lt;form action="" method='POST'&gt; 
  &lt;input  type='submit'  name='voted' value='Like'&gt;
   &lt;input  type='submit' name='votes' value='Dislike'&gt;
  &lt;/form&gt;
  
  &lt;?php
  $connect = mysqli_connect ("localhost", "root", "muarem1") or die ("Couldn not connect!");
  mysqli_select_db ($connect, "likesystem") or die ("Couldn't find db");
  $result = mysqli_query($connect,"SELECT * FROM fyci WHERE id=1");
  while ($row = mysqli_fetch_assoc($result)) {
  $voted = $row["voted"];
  }
  if (isset($_POST['voted'])){
  $votes = $voted+1;
  $update = mysqli_query($connect,"UPDATE fyci SET voted='$votes' WHERE id=1");
  }else 
  if (isset($_POST['votes'])){
  $dislike = $voted-1;
  $update = mysqli_query($connect,"UPDATE fyci SET voted='$dislike' WHERE id=1");
  }
  echo "Likes: $voted";
  ?&gt;
  </code></pre>
  
  <p>Submit form and stay on same page?
            Thank You !</p>
  
  <p>and I would like to stay on the same page, when Submit is clicked.</p>
  
  <p>How should that be done?</p>