To install a cms i have a form in which i ask user to enter a database name he wants the script to make tables into. After that i have my only three cms tables.
i am trying to read that dump.sql file using the file = get_file_contents(dump.sql) and then mysql_query($file);
but nothing is happening please suggest or help.
mysql_querycan not run multiple queries in once.you can try mysqli:multi_query() function
OR
There is another way to do this with exec and mysql command.
You can execute the mysql command to store the tables in database using the exec function of php.
That will be something like this