����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 162.0.232.25 / Your IP : 3.148.112.15 Web Server : LiteSpeed System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : kwacuqig ( 988) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/kwacuqig/gateman.skilltainment.org/ |
Upload File : |
<?php include './head.php'; include './header.php'; include './sidebar.php'; $run = mysqli_query($conn, "SELECT * FROM `users` WHERE `uid`=$user") or mysqli_error($conn); $profile = mysqli_fetch_array($run); ?> <!--********************************** Content body start ***********************************--> <div class="content-body"> <!-- row --> <div class="page-titles"> <ol class="breadcrumb"> <li> <h5 class="bc-title">Profile</h5> </li> <li class="breadcrumb-item"><a href="index.html"> <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M2.125 6.375L8.5 1.41667L14.875 6.375V14.1667C14.875 14.5424 14.7257 14.9027 14.4601 15.1684C14.1944 15.4341 13.8341 15.5833 13.4583 15.5833H3.54167C3.16594 15.5833 2.80561 15.4341 2.53993 15.1684C2.27426 14.9027 2.125 14.5424 2.125 14.1667V6.375Z" stroke="#2C2C2C" stroke-linecap="round" stroke-linejoin="round" /> <path d="M6.375 15.5833V8.5H10.625V15.5833" stroke="#2C2C2C" stroke-linecap="round" stroke-linejoin="round" /> </svg> Home</a> </li> <li class="breadcrumb-item"><a href="javascript:void(0)">Profile</a></li> </ol> </div> <div class="container-fluid"> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-header"> <h4 class="card-title">Profile</h4> </div> <div class="card-body"> <div class="basic-form"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <div class="row"> <div class="col-xl-6 mb-3"> <label for="exampleFormControlInput2" class="form-label">First Name<span class="text-danger">*</span></label> <input type="text" class="form-control" id="exampleFormControlInput2" name="fname" placeholder="First Name" value="<?php echo $profile['firstname']; ?>" required> </div> <div class="col-xl-6 mb-3"> <label for="exampleFormControlInput2" class="form-label">Last Name<span class="text-danger">*</span></label> <input type="text" class="form-control" id="exampleFormControlInput2" name="lname" placeholder="Last Name" value="<?php echo $profile['surname']; ?>" required> </div> <div class="col-xl-6 mb-3"> <label for="exampleFormControlInput3" class="form-label">Email<span class="text-danger">*</span></label> <input type="email" class="form-control" id="exampleFormControlInput3" name="email" placeholder="Email" value="<?php echo $profile['email']; ?>" required> </div> <div class="col-xl-6 mb-3"> <label for="exampleFormControlInput88" class="form-label">Mobile<span class="text-danger">*</span></label> <input type="number" class="form-control" id="exampleFormControlInput88" name="mobile" placeholder="Mobile" value="<?php echo $profile['mobile']; ?>" required> </div> <div class="col-xl-6 mb-3"> <label class="form-label">Gender<span class="text-danger">*</span></label> <select class="default-select style-1 form-control" name="gender"> <option selected><?php echo $profile['gender']; ?></option> <option value="Male">Male</option> <option value="female">Female</option> <option value="other">Other</option> </select> </div> <div class="col-xl-6 mb-3"> <label for="exampleFormControlInput8" class="form-label">Date of Birth<span class="text-danger">*</span></label> <input type="date" class="form-control" id="exampleFormControlInput8" name="dob" value="<?php echo $profile['dob']; ?>" required> </div> <div class="col-xl-6 mb-3"> <label for="exampleFormControlInput4" class="form-label">New Password</label> <input type="password" class="form-control" id="exampleFormControlInput4" name="password" placeholder="Enter New Password"> </div> <input type="hidden" name="uid" value="<?php echo $profile['uid']; ?>"> </div> <div> <button class="btn btn-danger light ms-1">Cancel</button> <button class="btn btn-primary me-1" type="submit" name="submit">Update</button> </div> </form> </div> </div> <?php if (isset($_POST['submit'])) { $uid = mysqli_real_escape_string($conn, $_POST['uid']); $fname = mysqli_real_escape_string($conn, $_POST['fname']); $lname = mysqli_real_escape_string($conn, $_POST['lname']); $email = mysqli_real_escape_string($conn, $_POST['email']); $mobile = mysqli_real_escape_string($conn, $_POST['mobile']); $gender = mysqli_real_escape_string($conn, $_POST['gender']); $dob = mysqli_real_escape_string($conn, $_POST['dob']); $password = isset($_POST['password']) ? md5(mysqli_real_escape_string($conn, $_POST['password'])) : null; // Check if a new password is provided // Update the user details $query = "UPDATE `users` SET `firstname`='$fname', `surname`='$lname', `email`='$email', `mobile`='$mobile', `gender`='$gender', `dob`='$dob'"; if (!is_null($password)) { $query .= ", `password`='$password'"; } $query .= " WHERE `uid`='$uid'"; if (mysqli_query($conn, $query)) { ?> <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function(event) { swal("", "Details Were Successfully Updated", "success"); setTimeout(function() { window.location = 'profile.php'; }, 2000); }); </script> <?php } else { die(mysqli_error($conn)); } } ?> </div> </div> </div> </div> </div> <!--********************************** Content body end ***********************************--> <?php include './footer.php'; include './scripts.php'; ?>