This is a simple Todo application built with PHP and MySQL.
- Add new tasks
- Delete existing tasks
- List all tasks
- PHP 7.4 or higher
- MySQL
- Composer (for dependency management)
-
Clone the repository:
git clone https://github.com/dansarpong/todo-php.git todo-app cd todo-app
-
Install dependencies:
composer install
-
Create a
.env
file in the root directory and add your database configuration:DATABASE_HOST=localhost DATABASE_PORT=3306 DATABASE_NAME=todo DATABASE_USER=user DATABASE_PASSWORD=password
-
Run the application:
php -S localhost:8000
-
Open your browser and navigate to
http://localhost:8000
.
- To add a new task, enter the task in the input field and click "Add".
- To delete a task, click the "Delete" button next to the task.