I am building a CMS from scratch and my first step is the installation. I would like to create the database automatically on the install page (something like Fantastico) but I don’t know how to do that.
I know how to create a database using the following code, but that requires the db host, db username and db password information. Fantastico installs a script (such as WordPress) without bothering with that details. Do you have any ideas how to do that?
you can run checks to see if the tables exist on the initial load and define a constant or variable to determine if it needs to run the tables installation or not, an older (imo better) technique is create an install file and delete it after the site is installed