Todo List is a web application built using PHP and JavaScript to manage tasks. Users can create, update, delete, and view tasks. The tasks are stored in a MySQL database using PDO for database interactions.
- ✅ Create tasks: Users can add new tasks with a title, description, and due date.
- ✅ Update tasks: Users can edit task details such as the title, description, and due date.
- ✅ Delete tasks: Users can remove tasks from the list.
- ✅ View tasks: Users can see a list of all tasks and their details.
- ✅ Error handling: The application handles errors, such as invalid input or database errors.
- PHP: The backend programming language for handling server-side logic and database interactions.
- MySQL: The database management system for storing and retrieving task data.
- HTML/CSS: The frontend technologies for creating the user interface.
- JavaScript: The programming language for handling client-side logic and user interactions.
- PDO: The PHP Data Objects extension for database interactions.
- Practiced working with PHP and MySQL to build a web application.
- Developed CRUD functionality for managing tasks using PDO.
- Learned to handle form validation and error handling.
- Gained experience with database interactions and data persistence using PDO.
- Developed without any frameworks or libraries for stronger foundational knowledge.
Before you begin, make sure you have the following installed:
- PHP >= 7.4
- MySQL or MariaDB
- A web browser (e.g., Chrome, Firefox)
-
Clone the repository:
git clone https://github.com/Cauebf/php-todo-list.git cd php-todo-list
-
Set up the database:
-
Import the SQL schema (
todo_list.sql
), or create the necessary table manually. -
Example SQL:
CREATE DATABASE todo_list; USE todo_list; CREATE TABLE tasks ( id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, description varchar(50) NOT NULL, completed tinyint(1) NOT NULL DEFAULT 0 );
-
-
Configure the database connection:
-
Open the
config/conn.php
file. -
Update the connection details with your MySQL credentials:
$hostname = "your_database_host"; $username = "your_database_username"; $password = "your_database_password"; $dbname = "your_database_name";
-
-
Start the PHP development server:
From the project root directory, run:
php -S localhost:8000
-
Access the application in your browser:
http://localhost:8000
You should now see the Todo List application running.
💡 Tip: For a more robust development experience, consider using a tool like XAMPP or Laragon to manage your PHP and MySQL stack.
Contributions are welcome! Feel free to open issues or pull requests for any improvements or bug fixes.
For any inquiries or collaboration opportunities, feel free to reach out via: