Initial
This commit is contained in:
parent
163bb62a04
commit
63b19062ea
Binary file not shown.
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ca">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Guestbook</title>
|
||||
</head>
|
||||
<body>
|
||||
hola
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
createDB();
|
||||
|
||||
function createDB()
|
||||
{
|
||||
$db = new SQLite3('guestbook.db');
|
||||
$db->exec("CREATE TABLE user
|
||||
(id_user INTEGER PRIMARY KEY, username TEXT NOT NULL UNIQUE, password TEXT)");
|
||||
$db->exec("CREATE TABLE message
|
||||
(id_msg INTEGER PRIMARY KEY, id_user INT, content TEXT NOT NULL,
|
||||
FOREIGN KEY (id_user) REFERENCES user (id_user))");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue