Delete data from database by ID : Database Delete : MySQL Database PHP Source Code


PHP Source Code » MySQL Database » Database Delete »

 

Delete data from database by ID





<html>
<body>
<?php
$cnx = mysql_connect('mysql153.secureserver.net','navioo','password');
mysql_select_db('jamySql');

$id = '1';
$ok1 = @mysql_query("DELETE FROM Employee WHERE ID='$id'");
if ($ok1) {
  echo('<p>Author deleted successfully!</p>');
else {
  echo('<p>Error deleting author from database!<br />'.
       'Error: ' . mysql_error() '</p>');
}

?>
</body>
</html>


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo MySQL Database
» Database Delete