-
Notifications
You must be signed in to change notification settings - Fork 0
/
signin.php
52 lines (36 loc) · 1.19 KB
/
signin.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
<?php
include_once 'header.php';
?>
<div class="login">
<?php
if (isset($_SESSION['u_id'])){
echo '<div class="userpage">';
echo "Name: " . $_SESSION['u_first'];
echo $_SESSION['u_last'];
echo "<br>";
echo "Number of kids: " . $_SESSION['u_kid'];
echo "<br>";
echo "cpr: " . $_SESSION['u_cpr'];
echo "<br>";
// echo $_SESSION['u_file'];
$userpicture = $_SESSION['u_file'];
// Img Src
$url = 'uploads/' . $userpicture;
echo "url: " . $url;
echo "<img src=" .$url . " width=100px>";
echo '<form action="logout-inc.php" method="POST">
<button type="submit" name="submit">Logout</button>
</form>';
echo'</div>';
} else{
echo '<form action="login-inc.php" method="POST">
<input type="text" name="uid" placeholder="Username/e-mail">
<input type="password" name="pwd" placeholder="password">
<button type="submit" name="submit" >Login</button>
</form>
<a class="login-a" href="signup-inc.php">Sign up</a>';
}
?>
</div> <!-- /nav-login -->
</body>
</html>