title: how can i delete the records from database in php
body: <p>I have created one link on different page (Delete). After that, I wrote following code to execute the query, but somehow it's showing the 'success' message, but it's not deleting particular record from database... Any suggestions?</p>
  
  <pre><code>&lt;?php
          include_once('data_conn.php');
          $id=$_GET['id'];
               $sql = "DELETE FROM driver_info where id=$id";
                    echo $sql;
                      if(!$sql ) {
                                    echo '&lt;script language="javascript"&gt;';
              echo 'alert("something went Wrong...:(((("); location.href="user-profile.php"';
              echo '&lt;/script&gt;';
             }
                      else{
                         echstrong texto '&lt;script language="javascript"&gt;';
              echo 'alert("successfully Deleted!!!"); location.href="user-profile.php"';
              echo '&lt;/script&gt;';
              mysql_close();
                      }
  ?&gt;
  </code></pre>