-
Notifications
You must be signed in to change notification settings - Fork 0
/
CE3.php
68 lines (50 loc) · 1.62 KB
/
CE3.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
<!DOCTYPE html>
<html>
<head>
<title>INF115 - CE3</title>
</head>
<body>
<h1>INF115 - Compulsary exercise 3</h1>
<?php
/*
Database configuration
*/
// Connection parameters
$host = 'localhost';
$user = 'root';
$password = '';
$db = 'bysykkel';
// Connect to the database
$conn = mysqli_connect($host, $user, $password, $db);
// Connection check
if(!$conn) {
exit('Error: Could not connect to the database.');
}
// Set the charset
mysqli_set_charset($conn, 'utf8');
?>
<h1> Task 1 </h1>
<h2> a) </h2>
<!-- Write your solution to 1a here -->
<h2> b) </h2>
<!-- Write your solution to 1b here -->
<h2> c) </h2>
<!-- Write your solution to 1c here -->
<h1> Task 2 </h1>
<h2> a) </h2>
<!-- Write your solution to 2a here -->
<h2> b) </h2>
<!-- Write your solution to 2b here -->
<h2> c) </h2>
<!-- Write your solution to 2c here -->
<h1> Task 3 </h1>
<h2> a) </h2>
<!-- Write your solution to 3a here -->
<h2> b) </h2>
<!-- Write your solution to 3b here -->
<h2> c) </h2>
<!-- Write your solution to 3c here -->
<h1> Task 4 </h1>
<!-- Write your solution to 4 here -->
</body>
</html>