-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.php
executable file
·101 lines (84 loc) · 2.78 KB
/
database.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
//use different account for different purpose so that they can't do SQL injection attack
$servername = "localhost";
$username = "AuctionUserView";
$password = "PasswordAuctionViewDBMS2020";
$table = "Auction";
// Create connection
$connectionView = new mysqli($servername, $username, $password, $table);
// Check connection
if ($connectionView->connect_error) {
die("Connection failed: " . $connectionView->connect_error);
}
//echo "Connected successfully";
?>
<?php
//$connectionAddAuction is for creating Auction
$servername = "localhost";
$username = "AuctionUserCreateAuction";
$password = "PasswordAuctionCreateAuctionDBMS2020";
$table = "Auction";
// Create connection
$connectionAddAuction = new mysqli($servername, $username, $password, $table);
// Check connection
if ($connectionAddAuction->connect_error) {
die("Connection failed: " . $connectionAddAuction->connect_error);
}
//echo "Connected successfully auctionCreate";
?>
<?php
//$connectionAddUser is for creating Auction
$servername = "localhost";
$username = "AuctionUserCreateUser";
$password = "PasswordAuctionCreateUserDBMS2020";
$table = "Auction";
// Create connection
$connectionAddUser = new mysqli($servername, $username, $password, $table);
// Check connection
if ($connectionAddUser->connect_error) {
die("Connection failed: " . $connectionAddUser->connect_error);
}
//echo "Connected successfully userCreate";
?>
<?php
//$connectionAddWatchlist is for creating Auction
$servername = "localhost";
$username = "AuctionUserWatchList";
$password = "PasswordAuctionWatchListDBMS2020";
$table = "Auction";
// Create connection
$connectionWatchlist = new mysqli($servername, $username, $password, $table);
// Check connection
if ($connectionWatchlist->connect_error) {
die("Connection failed: " . $connectionWatchlist->connect_error);
}
//echo "Connected successfully Watchlist";
?>
<?php
//$connectionAddWatchlist is for creating Auction
$servername = "localhost";
$username = "AuctionUserCreateBids";
$password = "PasswordAuctionCreateBidsDBMS2020";
$table = "Auction";
// Create connection
$connectionAddBids = new mysqli($servername, $username, $password, $table);
// Check connection
if ($connectionAddBids->connect_error) {
die("Connection failed: " . $connectionAddBids->connect_error);
}
//echo "Connected successfully WatchlistCreate";
?>
<?php
//$connectionAddWatchlist is for creating Auction
$servername = "localhost";
$username = "AuctionUserUpdateOutcome";
$password = "PasswordAuctionUpdateOutcomeDBMS2020";
$table = "Auction";
// Create connection
$connectionUpdateOutcome = new mysqli($servername, $username, $password, $table);
// Check connection
if ($connectionUpdateOutcome->connect_error) {
die("Connection failed: " . $connectionUpdateOutcome->connect_error);
}
//echo "Connected successfully Outcome Update";
?>