-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuserprofile.php
48 lines (44 loc) · 1.09 KB
/
userprofile.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
<?php
session_start();
include 'dbh.php';
?>
<html>
<head>
<title>Home Page</title>
<link rel="stylesheet" type="text/css" href="design.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="general.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
</head>
<body>
<?php
//echo "hii";
if(isset($_SESSION['id'])){
$userId=$_SESSION['id'];
?>
<div class="second">
<h1 class="homepage-heading">Home Page</h1>
<a class="btn" href="schedule.php">Today's Schedule</a>
<form class="sos_form" method="POST" action="">
<input type="hidden" name="id" value="<?php echo $userId; ?>">
<button type="submit" class="sos_form_btn" style="">CALL FOR HELP</button>
</form>
<p id="sos_error"></p>
<a href="logout.php" class="logout">Log out</a>
</div>
<?php
}
else
{
if(!isset($_SESSION['id']))
{
header('Location: userprofile.php?id='.$_SESSION['id']);
}
else
{
//header('Location: index.php');
}
}
?>
</body>
</html>