This code snippet opens a CSV file containing country data, establishes a connection to a MySQL database, creates a table to store the country data if it doesn't exist, and inserts the country names into the table after decoding them from UTF-8. It's a basic implementation for handling country-related functionality in PHP.
To run this project, you will need the following dependencies:
- Apache Server
- PHP 8
- Web browser
- Database - MySQL
- Clone this repository to your local machine:
git clone https://github.com/sondercs/Country-Php.git-
Ensure that Apache server is running and PHP 8 is installed on your system.
-
Navigate to the project directory:
cd Country-Php-
Start the Apache server.
-
Open your web browser and navigate to
http://localhost/Country-Phpto access the project.
- transfers information from a CSV file to the Database
If you have any questions or concerns, feel free to contact the project owner:
- LinkTree: [Sonder_cs]https://linktr.ee/Sonder_cs)