-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_details.php
75 lines (66 loc) · 2.22 KB
/
project_details.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
<?php
// Include the config file
require_once "config.php";
$conn = mysqli_connect($host, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$pid = $_GET['pid'];
$sql = "SELECT * FROM projects WHERE pid=$pid";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
$sql2 = "SELECT * FROM users WHERE uid=$row[uid]";
$result2 = mysqli_query($conn, $sql2);
$userRow = mysqli_fetch_assoc($result2);
// close the database connection
mysqli_close($conn);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Project Details</title>
<link rel="stylesheet" href="css/[email protected]">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat&family=Open+Sans&display=swap" rel="stylesheet">
</head>
<body>
<div class="container" style="text-align: left;">
<div class="prompt-container">
<h1 style="text-align: center;">
<?php echo $row["title"]; ?>
</h1>
<h2>
<?php echo $row["description"]; ?>
</h3>
<br>
<h3><strong>Submitted by :</strong>
<?php echo $userRow["username"]; ?>
</h2>
<h3><strong>E-Mail :</strong>
<?php echo $userRow["email"]; ?>
</h3>
<h3><strong>Phase :</strong>
<?php echo $row["phase"]; ?>
</h3>
<br>
<p>
<?php echo $row["start_date"] . " to " . $row["end_date"]; ?>
</p>
<button class="button" onclick="window.location.href='view_projects.php'">Back</button>
</div>
</div>
<footer>
<div class="logo-container">
<a href="index.php">
<img src="img/ap.svg" alt="logo">
</a>
</div>
<div class="footer-text">
<span>©2023 M Kalam | [email protected]</span>
</div>
</footer>
</body>
</html>