Advertisement
faizulclass

edit_profile.php

Nov 8th, 2024 (edited)
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.07 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Edit Profile</title>
  7.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  8. </head>
  9. <body>
  10. <?php
  11.  
  12. // Include header
  13. include('header.php');
  14. ?>
  15.     <div class="container">
  16.         <div class="row">
  17.             <!-- Include Left Navigation -->
  18.             <?php include('nav.php'); ?>
  19.  
  20.             <!-- Main Content Section -->
  21.             <div class="col-md-9">
  22.                 <h2>Edit Profile</h2>
  23.                 <?php if ($error): ?>
  24.                     <div class="alert alert-danger"><?php echo $error; ?></div>
  25.                 <?php endif; ?>
  26.                 <?php if ($success): ?>
  27.                     <div class="alert alert-success"><?php echo $success; ?></div>
  28.                 <?php endif; ?>
  29.                 <form method="POST" action="edit_profile.php">
  30.                  <div class="form-group">
  31.                         <label for="username">Username:</label>
  32.                         <input type="text" name="username" id="username" class="form-control" value="<?php echo htmlspecialchars($user['username']); ?>" disabled>
  33.                     </div>
  34.                     <div class="form-group">
  35.                         <label for="full_name">Full Name:</label>
  36.                         <input type="text" name="full_name" id="full_name" class="form-control" value="<?php echo htmlspecialchars($user['full_name']); ?>" required>
  37.                     </div>
  38.                     <div class="form-group">
  39.                         <label for="email">Email:</label>
  40.                         <input type="email" name="email" id="email" class="form-control" value="<?php echo htmlspecialchars($user['email']); ?>" required>
  41.                     </div>
  42.                     <button type="submit" class="btn btn-primary">Update Profile</button>
  43.                 </form>
  44.             </div>
  45.         </div>
  46.     </div>
  47.     <?php
  48. // Include footer
  49. include('footer.php');
  50. ?>
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement