prepare("UPDATE users SET bio = ? WHERE id = ?"); if (!$statement) { $errorMessage = "An unexpected error occurred while editing the profile."; } else { $bio = isset($_POST['bio']) && $_POST['bio'] ? $_POST['bio'] : null; $statement->bind_param('si', $bio, $userData['id']); if (!$statement->execute()) { $errorMessage = "An unexpected error occurred while editing the profile."; $statement->close(); } else { $profileEdited = true; $statement->close(); } } } } if (!$profileEdited) { $pageTitle = "Edit profile"; $pageDescription = "Edit your profile in SVR.JS Mods directory."; } else { $pageTitle = "Profile edited"; $pageDescription = "Your profile has been edited."; } include 'header.php'; ?>

Profile edited

Your profile has been edited.

View your profile

Edit profile

Username:

' . htmlspecialchars($errorMessage) . '

'; ?>