-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.php
32 lines (31 loc) · 725 Bytes
/
dashboard.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
<?php
session_start();
include("databaseconnection.php");
$user=$_SESSION['username'];
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
echo "<h1>Welcome, $user!</h1>";
$sql="SELECT filename FROM userid WHERE username='$user'";
$stmt=$database->prepare($sql);
$stmt->execute();
$filename=$stmt->fetchColumn();
echo $filename;
if($filename==NULL){
echo "<h2>Please upload your .ics file</h2>";
} else {
header("location: group.php");
}
?>
<form action="upload2.php" method="post" enctype="multipart/form-data">
Select files to upload:
<input type="file" name="fileToUpload" id="fileToUpload"><br />
<input type="submit" value="Upload File" name="submit">
</form>
</body>
</html>