-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
73 lines (65 loc) · 1.75 KB
/
view.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
<?php
session_start();
if(isset($_SESSION['uname']))
echo "current session: " . $_SESSION['uname'];
else
{
echo "not logged in";
$_SESSION['uname']="guest";
}
require_once 'dbconfig/config.php';
?>
<?php
/*if(isset($_POST ["upload"]))
{
echo "fdsfdf";
}*/
if(isset($_POST ["lout"]))
{
session_destroy();
header('location:index.php');
}
?>
<?php
$user=$_SESSION['uname'];
$sql="SELECT * FROM itax where username='$user'";
//$result_set=mysqli_query($sql);
// $row=mysqli_fetch_array($result_set);
$result = $con->query($sql);
$row = $result->fetch_assoc();
?>
<html>
<head>
<title>User Database</title>
<link rel="stylesheet" href="b.css"/>
</head>
<body>
<div id="header">
<center>User Database</center>
</div>
<div id="body">
<form class="myform" action="" method="post">
<table align="center" width="80%" border="1">
<tr>
<th colspan="4">your uploads!!</th>
</tr>
<tr>
<td>2016</td>
<td>2017</td>
<td>2018</td>
<td>2019</td>
</tr>
<tr>
<td><a href="<?php echo $row['data2016'] ?>" target="_blank" ><?php echo $row['data2016'] ?></a></td>
<td><a href="<?php echo $row['data2017'] ?>" target="_blank" ><?php echo $row['data2017'] ?></a></td>
<td><a href="<?php echo $row['data2018'] ?>" target="_blank" ><?php echo $row['data2018'] ?></a></td>
<td><a href="<?php echo $row['data2019'] ?>" target="_blank" ><?php echo $row['data2019'] ?></a></td>
</tr>
</table><br><br>
<center><a href="upload.php"><input type="button" class="abc" name="upload" value="Upload more"></a><br><br>
<button name="lout">Log out</button> </center>
<?php mysqli_close($con); ?>
</form>
</div>
</body>
</html>