Deleting Database in MySql using PHP

Deleting Database in MySql using PHP:
<?
$sql = “DROP DATABASE testDB2”;
$connection = @mysql_connect(“localhost”,”rot”,”root”)or die(mysql_error());
$result = @mysql_query($sql,$connection) or die(mysql_error());
if ($result) {
$msg =”<P>Database has been deleted!</P>”;
}
?>
<HTML>
<HEAD>
<TITLE>Delete a MySQL Database</TITLE>
</HEAD>
<BODY>
<? echo “$msg”; ?>
</BODY>
</HTML>

About the author

Being the CEO and Founder of ClecoTech International, Mr. Ashish Prajapati is dedicated towards his aim of mentoring young startups into a full-fledged businesses. He is helping startups from America, Europe, India, and various other countries through proper guidance and the use of latest technologies to develop their innovation and ideas into definite realities.

Leave a Reply

Your email address will not be published. Required fields are marked *