Initialising DB..."); echo "
Create table `accounts`"; $stmt = $pdo->prepare('CREATE TABLE `accounts` ( `id` tinytext NOT NULL, `email` text NOT NULL, `display_name` text NULL, `password` text NOT NULL, `verified` tinyint(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;'); try { $stmt->execute(); } catch (PDOException $e) { echo('
An error occurred: '. $e->getMessage() .'. Will skip. (Most likely the table already exists.)'); } echo '
Set indexes for table `accounts`'; $stmt = $pdo->prepare('ALTER TABLE `accounts` ADD PRIMARY KEY (`id`(7)), ADD UNIQUE KEY `email` (`email`) USING HASH;'); try { $stmt->execute(); } catch (PDOException $e) { echo('
An error occurred: '. $e->getMessage() .'. Most likely this is already set.'); } echo "
Database initialised.
"; } } ?>Assuming you have the database config configured, you can click this button to create the tables required for this thing to function.