Make a form with chat room name and process it for existing table name, chars or the like, and if its success make the query like:
PHP Code:
mysql_query('CREATE TABLE IF NOT EXISTS `"'.$room_name.'"` (
`id` bigint(100) NOT NULL auto_increment,
//other params... ,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ');
Comment