Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion login.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
try {
$db = new SQLite3(DB_FILE);
$db->exec("CREATE TABLE user (id integer PRIMARY KEY,name text,password text)");
$db->exec("INSERT INTO user (name, password) VALUES ('erinn','$2y$10$n5ajLY.kMZVjLCNsUuPXFO70VUYLoolpQRGl3RCXOBVIaY4/peWXS')");

$db->exec("CREATE TABLE category (id integer PRIMARY KEY,name text,orderby integer)");
$db->exec("INSERT INTO category (name, orderby) VALUES('Basics', 1),('Spoofs', 2),('Denial of Service', 3),('Attacks', 4)");
$db->exec("CREATE TABLE level (id integer PRIMARY KEY,category_id integer,name text,orderby integer,filename text)");
Expand Down
3 changes: 3 additions & 0 deletions register.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
require_once 'login.inc.php';

if (isset($_POST['reg_username']) && isset($_POST['reg_password'])) {
if($_POST['reg_username']==="" || $_POST['reg_password']==="")
exit("Empty username or password");

$userq->bindValue(':name', $_POST['reg_username']);
$res = $userq->execute();

Expand Down