You do not want to create a new table for each user. Instead, restructure your database.
Usually you have a table for questions, a table for parameters (possibly a Boolean column to indicate the correct answer), a user table and a connection table for users, and parameters for storing user responses, Example of a scheme:
CREATE TABLE `options` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `question_id` int(10) unsigned NOT NULL, `text` varchar(255) NOT NULL, `correct` tinyint(1) NOT NULL, PRIMARY KEY (`id`), KEY `question_id` (`question_id`) ) TYPE=InnoDB; CREATE TABLE `options_users` ( `option_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, `created` timestamp NOT NULL, KEY `option_id` (`option_id`), KEY `user_id` (`user_id`) ) TYPE=InnoDB; CREATE TABLE `questions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `question` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`,`question`) ) TYPE=InnoDB; CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(60) NOT NULL, `password` char(40) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) ) TYPE=InnoDB; ALTER TABLE `options` ADD CONSTRAINT `options_ibfk_1` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `options_users` ADD CONSTRAINT `options_users_ibfk_2` FOREIGN KEY (`option_id`) REFERENCES `options` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `options_users_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
These are links to user questions and answers to parameters. I also added the created column to the options_users table so you can see when the user answered the question and tracked their progress over time.
source share