One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
147.79.69.192
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
awaha.in
/
public_html
/
Edit File:
profile.php
<?php session_name('vaishnavi_awaha'); session_start(); if (!isset($_SESSION['user_id'])) { // Redirect user to login page if not logged in header("Location: login.php"); exit(); } // Include database connection include 'admin/connection.inc.php'; // Fetch user details from the database $user_id = $_SESSION['user_id']; $query = "SELECT name, email, role FROM users WHERE id = '$user_id'"; $result = mysqli_query($conn, $query); $user = mysqli_fetch_assoc($result); if (!$user) { echo "User not found."; exit(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>User Profile</title> <link rel="stylesheet" href="styles.css"> <!-- Link to your CSS file --> </head> <body> <div class="profile-container"> <h2>Welcome, <?php echo htmlspecialchars($user['name']); ?>!</h2> <p><strong>Email:</strong> <?php echo htmlspecialchars($user['email']); ?></p> <p><strong>Role:</strong> <?php echo htmlspecialchars($user['role']); ?></p> <a href="logout.php" class="logout-btn">Logout</a> </div> <style> .profile-container { width: 50%; margin: 50px auto; padding: 20px; text-align: center; border: 1px solid #ddd; border-radius: 8px; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); font-family: Arial, sans-serif; } h2 { color: #333; } p { font-size: 18px; } .logout-btn { display: inline-block; margin-top: 15px; padding: 10px 20px; text-decoration: none; background: #d9534f; color: white; border-radius: 5px; } .logout-btn:hover { background: #c9302c; } </style> </body> </html>
Simpan