Initial commit untuk UAS SIG

This commit is contained in:
z0rayy
2026-06-08 21:16:23 +07:00
commit c90ce9aedc
39 changed files with 7105 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
require 'koneksi.php';
$c = getConnection();
$sql = "CREATE TABLE IF NOT EXISTS users (
id INT NOT NULL AUTO_INCREMENT,
username VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
$c->query($sql);
$passwordHash = password_hash('admin123', PASSWORD_DEFAULT);
$insert = "INSERT IGNORE INTO users (username, password) VALUES ('admin', '$passwordHash')";
$c->query($insert);
echo 'Users table created and admin user inserted.';