Tech Arise

Build a Simple To-Do List Application with PHP & Ajax

To-do lists are a great way to allow users to manage their daily tasks. User can add/update their do items, close the list items when completed, and also remove these permanently from a complete list
In this tutorial, we will build our own Do-list application with Ajax, PHP and MySQL.This is a very simple example, you can just copy paste and change according to your requirement.
Before started to implement the To-Do List Application with PHP, look files structure:
Step 1: Create the database and Table
For this tutorial, you need a MySQL database with the following table:
Step 2: Database Connection class
Create a controller file named DBConnection.php inside “class/” folder.
Step 3: Create a class file
Create a class file named Task.php inside “class/” folder.
Step 4: Create action file named action.php
Step 5: Create HTML file named index.php
We will create HTML file with an input and submit button to add and list Do-list items with out refresh page.
Step 6: Create JavaScript file named todo.js
We will handle AJAX request
Create files named (header.php and footer.php)
This file contains the header and footer section of the webpage. The Bootstrap library is used to provide a better UI, so, include it in the header and footer section.
header.php
footer.php
Exit mobile version