Show sourcecode
The following files exists in this folder. Click to view.
createTables.php
deleteActions.php
deletePlayers.php
index.js
index.php
javascript.js
jsonIndex.json
save.json
seePlayers.php
test.php
deletePlayers.php
29 lines ASCII Windows (CRLF)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Delete Players</title>
</head>
<body>
<?php
include ('../dbconnection.php');
try {
// sql to delete table
$sql = "DROP TABLE IF EXISTS players";
//use exec() because no results are returned
$dbconn->exec($sql);
echo "Table deleted successfully";
}
catch(PDOException $e)
{
echo $sql . "<br>" . $e->getMessage();
}
//Rensa kopplingen till databasen
$dbconn = null;
?>
</body>
</html>