-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprofile.php
More file actions
98 lines (76 loc) · 3.26 KB
/
profile.php
File metadata and controls
98 lines (76 loc) · 3.26 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
<html>
<title>profile</title>
<?php
session_start();
if ( isset( $_SESSION['user_id'] ) ) {
$idh=$_SESSION['user_id'];
} else {echo 'session expired.';
header("Refresh:0; URL=expiredsess.php");
die();
}
function getName(){
$id=$_SESSION['user_id'];
include 'connection.php';
$sql = "SELECT name FROM login WHERE username='".$id."'";
$result = $conn->query($sql);
if ($result->num_rows == 0 ) {
echo $id;
}
else{
while($row = $result->fetch_assoc()) {
$name=$row["name"];
}
$_SESSION['idname']=$name;
echo $name;
}
}
?>
<head>
<base target="_self" />
<link rel="stylesheet" href="1.css" />
<link rel="stylesheet" href="2.css" />
<link rel="stylesheet" href="3.css" />
<link rel="stylesheet" href="7.css" />
</head>
<body style="background-image:url(4.jpg)">
<div class="topnav" style="margin-bottom: 10px;">
<a class="active" href="home.php">Home</a>
<div class="dropdown">
<a class="dropbtn" href="">
<?php getName(); ?>
<i class="fa fa-caret-down"></i>
</a>
<div class="dropdown-content">
<a href="fp22.php?idx=<?php echo $idh; ?>">change password</a>
<a href="profile.php">edit profile</a>
</div>
</div>
<a href="bookings.php">Bookings</a>
<div><a href="logout.php">Logout</a></div>
</div>
<div>
<p style="background-color:rgba(170,0,0,0.2);text-align:center;font-size:35px;color:silver;width:1500px;font-family:pristina;margin-top:5px;margin-bottom:10px;">
<?php echo $_SESSION['idname']; ?>
</p>
</div>
<form action="updater.php" class="update_form_style" onsubmit="return validateForm();" method="post" style="align:center;">
<input type="text" name="name" value="" placeholder="name" minlength="3" maxlength="20" class="inp" pattern="[a-zA-Z]*"><br><br>
<input type="tel" class="inp" name="phone" value="" placeholder="enter 10-digit mobile number" maxlength="10" pattern="[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]">
<!--<span class="note"> format: x x x x x x x x x x(only digits)</span>-->
<br><br>
<select name="secques" id="ddmenu" class="dmenu" style="width:235px; min-height:28px; font-family:calibri; font-size:18;">
<option value="empty" selected hidden>Change Security Question: </option>
<option>What is your mother's maiden name?</option>
<option>What is your nick name?</option>
<option>Where is your favorite place to vacation?</option>
<option>Which city were you born in?</option>
<option>Where did you go to high school/college?</option>
<option>What is your favorite food?</option>
</select><br><br>
<input type="text" name="answer" value="" class="inp" placeholder="enter answer" maxlength="30" pattern="[a-zA-Z]*">
<br><br>
<input type="submit" class="inpbtn" value="Update">
<br><br>
</form>
</body>
</html>