-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustprofileedit.php
129 lines (122 loc) · 3.64 KB
/
custprofileedit.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
<?php
$conn=mysqli_connect("localhost","root","","majorpharma");
if(isset($_POST['insert']))
{
$user=$_POST['username'];
$pass=$_POST['password'];
$sql= "update registration SET password= '$pass' WHERE username='$user'"; //update query
//$sql = "UPDATE registration SET Password='$psw' WHERE Firstname='$fn'";
$r=mysqli_query($conn,$sql);
if ($r) {
echo "<script>alert(' update sucessfully');window.location.href='about.php';</script>";
} else {
echo "<script>alert(' password update fail');window.location.href='about.php';</script>";
}
/*
$result=mysqli_query($conn,$query);
if(mysqli_num_rows($result)==1)
{
echo "<script>alert(' update sucessfully')window.location.href='#';</script>";
}
else
{
echo "<script>alert(' update sucessfully')window.location.href='#';</script>";
echo "<script>alert(' password update fail');window.location.href='about.php';</script>";
}*/
$conn->close();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Sign in Form with Facebook and Twitter Buttons</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style type="text/css">
body{
background-image: url("images/hero_1.jpg");
background-size: cover;
}
.login-form {
width: 385px;
margin: 30px auto;
}
.login-form form {
margin-bottom: 15px;
background: #f7f7f7;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
padding: 30px;
}
.login-form h2 {
margin: 0 0 15px;
}
.form-control, .login-btn {
min-height: 38px;
border-radius: 2px;
}
.input-group-addon .fa {
font-size: 18px;
}
.login-btn {
font-size: 15px;
font-weight: bold;
}
.social-btn .btn {
border: none;
margin: 10px 3px 0;
opacity: 1;
}
.social-btn .btn:hover {
opacity: 0.9;
}
.social-btn .btn-primary {
background: #507cc0;
}
.social-btn .btn-info {
background: #64ccf1;
}
.social-btn .btn-danger {
background: #df4930;
}
.or-seperator {
margin-top: 20px;
text-align: center;
border-top: 1px solid #ccc;
}
.or-seperator i {
padding: 0 10px;
background: #f7f7f7;
position: relative;
top: -11px;
z-index: 1;
}
</style>
</head>
<body>
<div align="center">
<div class="login-form">
<form action=" " method="post">
<h2 class="text-center">Profile</h2>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
<input type="text" class="form-control" name="username" placeholder="Username" required="required">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
<input type="password" class="form-control" name="password" placeholder="Password" required="required">
</div>
</div>
<div class="form-group">
<button type="submit" name="insert"class="btn btn-primary login-btn btn-block">Update</button>
</div>
</form>
</body>
</html>