-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyprojects.php
More file actions
31 lines (22 loc) · 743 Bytes
/
myprojects.php
File metadata and controls
31 lines (22 loc) · 743 Bytes
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
<?php
session_start();
require("logout.html");
$servername = "localhost";
$username = "root";
$password = "";
$dbName = "projectdb";
$class = 0;
$conn = new mysqli($servername, $username, $password, $dbName);
$request = "select * from `projects` where `submittee` = ".$_SESSION['user'];
$projects = $conn->query($request);
if($projects->num_rows > 0){
echo '<br>My Projects:<br><br><form action = "project.php" method="get">';
while($row = $projects->fetch_assoc()){
echo '<button type="submit" name="project" value ="'.$row['id'].'">'.$row['name'].'</button><br>';
}
echo "</form>";
}else{
echo "<br>You have not submitted any projects.<br>";
}
require("submitproject.html");
?>