-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhome.php
More file actions
61 lines (29 loc) · 864 Bytes
/
home.php
File metadata and controls
61 lines (29 loc) · 864 Bytes
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
<?php
//Created By AnkDos
session_start(); //Starting the session
ob_start();
require 'connection.php';
$do=mysql_query("select * from users where id=".$_SESSION['ID']); /*Remember during time of login ,I have assigned
a session id, loads the user data using it from table(in simple word) */
$do1= mysql_fetch_array($do);
$name= $do1['username'];
$email= $do1['email'];
if ( !$do ) {
die("Connection failed : " . mysql_error());
}
//For logging out
if(isset($_GET['logout']))
{
session_destroy();
unset ($_SESSION['ID']);
header("Location: LOGIN.php");
}
?>
<center>
<h3> Welcome User : <?php echo $name; ?>
<h3> Your Email Id : <?php echo $email; ?>
</h3>
</center>
<footer>
<a href=?logout >logout</a>
</footer>