Login   Register  
PHP Classes
elePHPant
Icontem

File: adddb.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marius  >  dbFile  >  adddb.php  >  Download  
File: adddb.php
Role: Application script
Content type: text/plain
Description: adddb.php
Class: dbFile
file based web database and Administrator
Author: By
Last change:
Date: 2004-04-19 04:24
Size: 747 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
    <title>Untitled</title>
    
    <link rel="stylesheet" href="settings.css" type="text/css">
</head>

<body>
<?php
include("common.inc");
$dbf->select_db($DB);
if(
$action == 'Add') {
$query "CREATE DATABASE $DBname";
$result $dbf->query($query) or die("ERROR while making database, it already excists!");
print(
"<script>
location.href=\"down.php?msg=Database succesfully made!\";
</script>"
);
}
else {
$query "DROP DATABASE $DBname";
$result $dbf->query($query) or die("ERROR while dropping database, db doesnt excist!");
print(
"<script>
location.href=\"down.php?msg=Database succesfully deleted!\";
</script>"
);
}
?>

</body>
</html>