-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwelcome.php
More file actions
120 lines (110 loc) · 3.07 KB
/
Copy pathwelcome.php
File metadata and controls
120 lines (110 loc) · 3.07 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
session_start();
if(!isset($_SESSION["username"])){
header("Location:login.php");
exit();
}
// if(isset($_POST["box"])){
include("connet.php");
$sql = "Select id , username , email , password from signup";
$result = mysqli_query($conn , $sql);
$num = mysqli_num_rows($result);
if($num > 0){
while($row=mysqli_fetch_assoc($result)) {
echo "id: " . $row["id"]. " - Name: " . $row["username"]. " " . $row["email"]. "password: " . $row["password"]. "<br>";
}
}
else {
echo "0 results";
}
mysqli_close($conn);
// }
if(!isset($_POST["logout"])){
session_destroy();
header("Location:login.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome</title>
<style>
body{
display: flex;
margin-top: 40px;
justify-content: center;
background-color: rgb(240, 239, 239);
}
.box{
height: 350px;
width: 400px;
padding: 40px;
background-color: white;
box-shadow: 1px 1px 12px green;
border-radius: 5px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.form-box{
display: flex;
flex-direction: column;
margin-bottom: 0px;
max-height: 60px;
transition: max-height 0.2s;
}
#SignUp{
margin-left: 15px;
width: 40%;
height: 40px;
margin-top: 10px;
background-color: #007bffa6;
color: white;
font-size: large;
border-radius: 5px;
}
#login{
margin-left: 50px;
width: 40%;
height: 40px;
margin-top: 10px;
background-color: #c300ffab;
color: white;
font-size: large;
border-radius: 5px;
}
input{
margin-top: 5px;
height: 30px;
background-color: transparent;
border: 2px solid rgba(97, 96, 96, 0.329);
border-radius: 4px;
}
label{
color: rgba(85, 84, 84, 0.979);
}
form{
height: 300px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div class="box" name="box">
<form action="welcome.php" id="form" method="post">
<div class="box2">
<h1 style="color:green">Login successfully</h1>
<button type="button" id="login" onclick="location.href='login.php'" name="logout" >Logout</button>
</div>
</form>
</div>
<div class="showdata box">
</div>
</body>
</html>