Delete all rows from mySQL table in PHP
<p>I want to delete all rows in a table by clicking on a Button in PHP. I have used this code</p>

<pre><code>&lt;form&gt;
  &lt;input type="submit" class="button" name="delet" id="delet" value="DELETE WHOLE DATA"/&gt;
&lt;/form&gt;
&lt;br&gt;&lt;/br&gt;
&lt;?php

  //if($_GET){
  if(isset($_GET['delet'])){

    $link = mysql_connect('localhost', 'root', '');
    if (!$link) {
      die('Could not connect: ' . mysql_error());
    }
    $sql = "DELETE  FROM tfinal";
    $sql1=mysql_query($sql, $link);
    if (mysql_query( $sql1)) {
      echo "Database dqqwewrw was successfully dropped\n";
    } else {
      echo 'Error dropping database: ' . mysql_error() . "\n";
    }
  }
?&gt;
</code></pre>

<p>but after ruining it says: <code>Error dropping database: Query was empty</code>
Any idea regarding overcome this problem</p>