Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
<?php
include "db.php";
echo "<h1>Setting Up User Bio Feature</h1>";
try {
// Check if bio column exists
$result = $conn->query("SHOW COLUMNS FROM users LIKE 'bio'");
if ($result->rowCount() == 0) {
// Add bio column to users table
$conn->exec("ALTER TABLE users ADD COLUMN bio TEXT DEFAULT NULL");
echo "✅ Added 'bio' column to users table<br>";
} else {
echo "✅ 'bio' column already exists in users table<br>";
}
echo "<p>Setup complete! Users can now add a bio to their profile.</p>";
echo "<p>Visit <a href='profile.php'>your profile</a> to add your bio.</p>";
} catch (PDOException $e) {
echo "❌ Error: " . $e->getMessage() . "<br>";
}
?>