prepare('UPDATE users SET ' . implode(', ', $set) . ' WHERE id = ?')->execute($values); $success = true; // Refresh session name $_SESSION['user_name'] = trim($_POST['fullname'] ?? ''); } catch (\PDOException $e) { $errors[] = 'Failed to update profile.'; } } } // Load current profile data from users table $profile = []; $stmt = $pdo->prepare('SELECT * FROM users WHERE id = ? LIMIT 1'); $stmt->execute([$userId]); $profile = $stmt->fetch() ?: []; $h = fn($v) => htmlspecialchars((string) $v, ENT_QUOTES, 'UTF-8'); include __DIR__ . '/../../layouts/header.php'; include __DIR__ . '/../../layouts/navbar.php'; ?>

Profile updated successfully.
avatar

Industry Details

To change your password, please use the Change Password page.