Usually when you have xampp, wamp and lamp your php files and databases are stored on your local machine and not the actual server so how would you move a finished project with its database from localhost to your server?
create zip file of your project and upload it to our server an then extract it there. And export your database, then sql file is created. Create database on server and import that sql file in that database. And change database connection settings. Create user with username and password on server database and provide that details in your connection settings.