blob: 4abafb03d5119a1e6ef8236b20fdd3ff26c43c29 [file] [log] [blame]
Andreu8192d552019-09-22 16:51:39 +02001<?php
2 require '../credentials.php';
3 require '../php/utils.php';
4
5 $dbname = $_GET['dbname'];
6
7 $create = "CREATE TABLE `".$dbname."` (
8 `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
9 `nom` varchar(100) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
10 `curs` tinyint(1) NOT NULL,
11 `grau` tinyint(1) NOT NULL,
12 `quimata` int(11) NOT NULL,
13 `requested` tinyint(1) NOT NULL DEFAULT 0,
14 `mort` tinyint(1) NOT NULL DEFAULT 0,
15 `password` varchar(100) NOT NULL DEFAULT ''
16 )";
17
Andreu04f79ef2019-09-22 18:52:19 +020018 /*
19 CREATE TABLE `morts` (
20 `id` int(11) NOT NULL,
21 `quimatava` int(11) NOT NULL,
22 `assassi` int(11) NOT NULL,
23 `curs` tinyint(1) NOT NULL,
24 `grau` tinyint(1) NOT NULL,
25 `data` date NOT NULL DEFAULT current_timestamp()
26 )
27 */
28
Andreu8192d552019-09-22 16:51:39 +020029 if (query($create)) header("Location: ./index.php?dbname=".$dbname);
30?>