-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
136 lines (132 loc) · 4.14 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
include ("includes/header.php");
include ("includes/config.php");
include ("includes/functions.php");
include ("includes/half.php");
$msg='';
$Name = '';
$Email = '';
if (isset($_POST['submit'])) {
$Name = $_POST['Name'];
$Email = $_POST['Email'];
$Location = $_POST['Location'];
mysqli_query($conn,"insert into profile(Name,Email,Location)
values('$Name','$Email','$Location')");
$msg = "<div class=''success'>Profile has been successfully updated.</div>";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Profile</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet">
<style type="text/css">
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Montserrat', sans-serif;
}
#bg{
background-color: #efefef;
}
.container{
width: 1200px;
height: 100%;
padding-top: 50px;
background-color: #fff;
margin-top:20px;
margin-bottom: 20px;
}
h2{
text-align:center;
}
.position-relative {
position: relative!important;
}
.menu {
margin-bottom: 15px;
list-style: none;
background-color: #fff;
border: 1px solid #d1d5da;
border-radius: 3px;
}
article, aside, details, figcaption, figure, footer, header, main, menu, nav, section {
display: block;
}
.menu-item.selected {
font-weight: 600;
color: #24292e;
cursor: default;
background-color: #fff;
}
.menu-item {
position: relative;
display: block;
padding: 8px 10px;
border-bottom: 1px solid #e1e4e8;
}
a{
color: #0366d6;
text-decoration: none;
}
a{
background-color: initial;
}
a:active, a:hover {
outline-width: 0;
}
.error{
color:red;
font-weight: bold;
}
.success{
color:green;
font-weight: bold;
}
</style>
</head>
<body id="bg">
<div class="container">
<div class="row">
<div class="col-3 float-left pr-4">
<nav class="menu position-relative" aria-label="Personal settings" data-pjax>
<h3 class="menu-heading">Personal Settings</h3>
<a class="js-selected-navigation-item selected menu-item" aria-current="page" href="profile.php">Profile</a>
<a class="js-selected-navigation-item selected menu-item" aria-current="page" href="account.php">Account</a>
<a class="js-selected-navigation-item selected menu-item" aria-current="page" href="Settings.php">Security</a>
</nav>
</div>
<div class="col-9 float-left">
<h10 class="font-weight-bold">Public Profile</h10>
<div class="dropdown-divider"></div>
<div>
<form method="post" id="prof">
<label><strong>Name</strong></label>
<input type="text" name="Name" class="form-control" value='<?php echo $Name; ?>'>
<br>
<label><strong>Public email </strong></label>
<input type="text" name="Email" class="form-control" value='<?php echo $Email; ?>'><br>
<label><strong>Bio </strong></label>
</form>
<textarea rows="4" cols ="40" name="comment" form="prof">Tell us a bit about yourself</textarea>
<div class="dropdown-divider"></div>
<form method="post">
<label><strong>Location</strong></label>
<input type="text" name="Location" class="form-control"><br>
<p>All of the fields on this page are optional and can be deleted at any time, and by filling them out, you're giving us consent to share this data wherever your user profile appears. Please see our <a href="privacy.php">privacy statement</a> to learn more about how we use this information.</p>
<button name="submit" class="btn btn-success">Update profile</button><br>
<?php echo $msg; ?>
</form>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>
</body>
</html>