-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
70 lines (64 loc) · 1.69 KB
/
profile.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
<?php
require 'core_login.php';
require 'database_connect.php';
if(loggedin())
{
$username = getuserfield('username');
$firstname = getuserfield('firstname');
$surname = getuserfield('surname');
if(isset($_SESSION['flag']))
{
if($_SESSION['flag']=='4')
{
$_SESSION['flag']='0';
?>
<script type="text/javascript">alert("Username changed successfully");</script>
<?php
}
else if($_SESSION['flag']=='5')
{
$_SESSION['flag']='0';
?>
<script type="text/javascript">alert("Password changed successfully");</script>
<?php
}
else if($_SESSION['flag']=='6')
{
$_SESSION['flag']='0';
?>
<script type="text/javascript">alert("Name changed successfully");</script>
<?php
}
else if($_SESSION['flag']=='7')
{
$_SESSION['flag']='0';
?>
<script type="text/javascript">alert("Mobile number changed successfully");</script>
<?php
}
else if($_SESSION['flag']=='8')
{
$_SESSION['flag']='0';
?>
<script type="text/javascript">alert("Security question changed successfully");</script>
<?php
}
}
echo '<b><i>'.$username.'</i></b><br>';
echo 'You\'re logged in, '.$firstname.' '.$surname.'.<br><br>';
?>
<a href="change_info.php?change=2">Change username</a><br><br>
<a href="change_info.php?change=3">Change password</a><br><br>
<a href="change_info.php?change=4">Change name</a><br><br>
<a href="change_info.php?change=5">Change mobile number</a><br><br>
<a href="change_info.php?change=6">Change security question</a><br><br><br>
<a href="order.php"><b>Order Now!</b></a><br><br><br>
<a href="logout.php"><b>Logout</b></a><br><br><br>
<a href="change_info.php?change=7">Delete Account</a>
<?php
}
else
{
header('Location: login.php');
}
?>