blob: 027788c444cc9d565d1fbc49f6aa0c0d166bb00b [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
18 if (query($create)) header("Location: ./index.php?dbname=".$dbname);
19?>