Tabel MyGuests succesvol verwijderd
<?php
// voorbeeld code connectpdo.php
/////////////SERVER-instellingen voorbeeld PDO connectie//////////////
/*
$servername = "localhost";
$username = "root";
$password = "";
// zet hier jou aangemaakte database naam
$dbname = "mydbpdo";
*/
// database connectie importeren.
include "connectpdo.php";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// sql to create table
$sql = "DROP TABLE MyGuests";
// use exec() because no results are returned
$conn->exec($sql);
echo "Tabel MyGuests succesvol verwijderd";
}
catch(PDOException $e)
{
echo $sql . "<br>" . $e->getMessage();
}
$conn = null;
// bron weegeven (weghalen)
show_source(__FILE__);
?>
<a href="createtable.php">Maak nieuwe tabel</a>
Maak nieuwe tabel