title: How to redirect a page using onclick event in php?
body: <p>I tried with this code but it's not working,</p>
  
  <pre><code>&lt;input type="button" value="Home" class="homebutton" id="btnHome" onClick="&lt;?php header("Location: /index.php"); ?&gt;" /&gt;
  </code></pre>