-
Notifications
You must be signed in to change notification settings - Fork 1
/
adminprofile1.php
87 lines (71 loc) · 2.75 KB
/
adminprofile1.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
<?php
include("header.php");
if(!isset($_SESSION['adminid']))
{
echo "<script>window.location='adminlogin.php';</script>";
}
if(isset($_POST['btnsubmit']))
{
$sqlupd ="UPDATE admin SET adminname='$_POST[adminname]', emailid='$_POST[emailid]' WHERE adminid='" . $_SESSION['adminid'] . "'";
$qsqlupd = mysqli_query($con,$sqlupd);
echo mysqli_error($con);
if(mysqli_affected_rows($con) == 1)
{
echo "<script>alert('Admin Record updated successfully...');</script>";
echo "<script>window.location='adminprofile.php';</script>";
}
}
if(isset($_SESSION['adminid']))
{
$sqlprofile = "SELECT * FROM admin WHERE adminid='" . $_SESSION['adminid'] . "'";
$qsqlprofile = mysqli_query($con,$sqlprofile);
$rsprofile = mysqli_fetch_array($qsqlprofile);
}
?>
<main id="main">
<!-- ======= Breadcrumbs ======= -->
<section class="breadcrumbs">
<div class="container">
<div class="d-flex justify-content-between align-items-center">
<h2>Admin Profile</h2>
<ol>
<li><a href="index.html">Home</a></li>
<li>Admin Profile</li>
</ol>
</div>
</div>
</section><!-- End Breadcrumbs -->
<!-- ======= Testimonials Section ======= -->
<section id="testimonials" class="padd-section">
<div class="container" data-aos="fade-up">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="testimonials-content">
<div id="carousel-example-generic" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<div class="top-top">
<h2>Admin Profile</h2>
<p>Kindly Update Your Profile</p>
<form action="" method="post" role="form" class="php-email-form" name="frm">
<div class="form-group">
Admin Name
<input type="text" name="adminname" class="form-control" id="adminname" placeholder="Admin Name" value="<?php echo $rsprofile['adminname']; ?>" >
</div>
<div class="form-group mt-3">
Email ID
<input type="email" class="form-control" name="emailid" id="emailid" placeholder="Email ID " value="<?php echo $rsprofile['emailid']; ?>" >
</div>
<br>
<div class="text-center"><button type="submit" name="btnsubmit" class="btn btn-success btn-lg">Update Profile</button></div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section><!-- End Testimonials Section -->
</main><!-- End #main -->
<?php include("footer.php"); ?>