-
Notifications
You must be signed in to change notification settings - Fork 0
/
intialize.php
72 lines (69 loc) · 1.79 KB
/
intialize.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
$sql="CREATE DATABASE formbuilder";
$conn->query($sql);
$sql="CREATE TABLE accinfo (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30),
email VARCHAR(30),
password VARCHAR(50)
)";
$conn->query($sql);
$sql="CREATE TABLE files (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fileurl VARCHAR(30),
title VARCHAR(30),
username VARCHAR(50),
description VARCHAR(100),
reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";
$conn->query($sql);
$sql="CREATE TABLE forminfo (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
noq INT(10),
title VARCHAR(30),
username VARCHAR(50),
description VARCHAR(100),
dandt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";
$conn->query($sql);
$sql="CREATE TABLE images (
id INT(6) ,
imageurl VARCHAR(30),
title VARCHAR(30),
username VARCHAR(50),
description VARCHAR(100),
dandt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";
$conn->query($sql);
$sql="CREATE TABLE message (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
message VARCHAR(300),
title VARCHAR(30),
username VARCHAR(50),
dandt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";
$conn->query($sql);
$sql="CREATE TABLE question(
id INT(6) ,
questions VARCHAR(300),
title VARCHAR(30),
uername VARCHAR(50),
description VARCHAR(100),
dandt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";
$conn->query($sql);
$sql="CREATE TABLE tobedelete (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY ,
questions VARCHAR(300),
title VARCHAR(30),
uername VARCHAR(50),
description VARCHAR(100),
dandt DATE
)";
$conn->query($sql);
?>