title: PHP: Confirm Box before deleting
body: <p>I want to add a button on my website, where a User can delete his Account. Unfortunately I don't know how to realize it... 
  my Code so far:
  Javascript:</p>
  
  <pre><code> &lt;script language = "JavaScript" &gt;
  
          function delete(id) {
              if (confirm("Do your really want to delete your account?"))
              {
                  header("refresh:1;url=intern.php?act=account"); 
              }
              else
              {
              }
          }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>my .html file:(there are no tags like html title head... it begins with ?php..)</p>
  
  <pre><code>&lt;td&gt;&lt;/form&gt;&lt;input type='submit' name='deleteuser' value='Delete Account' onClick='return delete()'/&gt;&lt;/form&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Also i have an if clause in the .html file:</p>
  
  <pre><code>if(isset($_POST['deleteuser']))  {
  
      if(delete() == true){
      delete_user;
      }
      else{
      header("refresh:1;url=intern.php?act=account");
      }
  
  }
  </code></pre>
  
  <p>The Button is there and when I click on it, it asks me if I'm sure to delete my account, but afterwards I got an error: <strong>"Fatal Error:Call to undefined function delete() "</strong></p>
  
  <p>I have a stored procedure named: sp_deleteAccount. In my config.php I declared it as:</p>
  
  <pre><code>$SQL_delete_user = "CALL sp_deleteAccount('";
  </code></pre>
  
  <p>Now I don't know how to bind that stored procedure in the code so that the Account will be deleted after pressing "Yes I want to delete my Account".</p>
  
  <p>Hope I didn't miss anything and someone can help me
  JOP</p>