title: Running PHP script after 10 seconds since load time
body: <p>I am building a website and I can not figure out one thing. I need a script that checks if 10 seconds have past since load time, then it would run another PHP script. But I am not sure if it is possible. I have attached my attempt at this problem. Any ideas? Thanks in advance!</p>
  
  <pre><code>if (
  &lt;script type="text/javascript"&gt;
      function viewplus(){
      }
      setTimeout(viewplus, 10000);
  &lt;/script&gt;
  )
  $query = "SELECT * FROM users WHERE id=" . $rws2['id_user'];
  $result2 = mysqli_query($db, $query);
  $rws2 = mysqli_fetch_array($result2);
  $views_total = $rws2['views_total'] + 1;
  $views_week = $rws2['views_week'] + 1;
  $views_today = $rws2['views_today'] + 1;
  $id = $rws2['id'];
  $query = "UPDATE users SET views_total='$views_total',views_week='$views_week',views_today='$views_today' WHERE id='$id'";
  mysqli_query($db, $query);
  </code></pre>