title: Return to Home page after Delete function PHP MYSQL JAVASCRIPT
body: <p>Sorry I'm Beginner, I would like to ask if how to go back from Home page or Specific Page after Delete.php it was only a blank page. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It's look like this after the delete was succesful.</p>
  
  <p><a href="https://i.stack.imgur.com/xjtve.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xjtve.png" alt="enter image description here"></a></p>
  
  <p>Here is my code:</p>
  
  <p><strong>delete.php</strong></p>
  
  <pre><code>&lt;?php
      session_start();
      include_once 'dbconnect.php';
      $id = $_GET['id'];
      $sql = mysql_query("DELETE FROM accounts where user_id='$id'");
  
      if ($sql &gt; 0) {
  ?&gt;
      &lt;script&gt; alert('Record has been successfully deleted'); &lt;/script&gt;
  &lt;?php
      } else {
  ?&gt;
      &lt;script&gt; alert('Database Error!'); &lt;/script&gt;
  &lt;?php
      }
  ?&gt;
  </code></pre>
  
  <p>Here is where I call the delete.php function:</p>
  
  <pre><code>&lt;td&gt;
      &lt;a href="delete.php?id=&lt;?php echo $row['user_id']; ?&gt;" onclick="return confirm('Are you sure?');"&gt;
          Delete
      &lt;/a&gt;
  &lt;/td&gt;
  </code></pre>