Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Tecflare Corporation
- * Copyright Tecflare Corporation
- * Provided by the Tecflare Corporation System
- * * Code has been scanned by styleci.io
- */
- $host = $_POST['hostname'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- $database = $_POST['database'];
- //Verify Connection
- $link = mysqli_connect($host, $username, $password, $database);
- /* check connection */
- if (mysqli_connect_errno()) {
- header('Location: index.php?error');
- die();
- }
- /* check if server is alive */
- if (!mysqli_ping($link)) {
- header('Location: index.php?error');
- die();
- }
- $conn = new mysqli($hostname, $username, $password, $database);
- $sql = 'CREATE TABLE Administrators (
- id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
- username VARCHAR(1000),
- password VARCHAR(1000)
- )';
- $conn->query($sql);
- $sql = 'CREATE TABLE Settings (
- id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
- code VARCHAR(1000),
- value VARCHAR(1000)
- )';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement