Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
<?php
include "db.php";
echo "<h1>Setting Up Copied Lists Tracking</h1>";
try {
// Check if is_copy column exists
$result = $conn->query("SHOW COLUMNS FROM word_lists LIKE 'is_copy'");
if ($result->rowCount() == 0) {
// Add is_copy column to word_lists table, default to 0 (not a copy)
$conn->exec("ALTER TABLE word_lists ADD COLUMN is_copy TINYINT(1) NOT NULL DEFAULT 0");
echo "✅ Added 'is_copy' column to word_lists table<br>";
} else {
echo "✅ 'is_copy' column already exists in word_lists table<br>";
}
echo "<p>Setup complete! The system can now track which lists are copies.</p>";
echo "<p>Visit <a href='my_lists.php'>My Lists</a> to manage your lists.</p>";
} catch (PDOException $e) {
echo "❌ Error: " . $e->getMessage() . "<br>";
}
?>