├── README.md
├── add-list.php
├── add-task.php
├── config
└── constants.php
├── css
└── style.css
├── delete-list.php
├── delete-task.php
├── index.php
├── list-task.php
├── manage-list.php
├── references.txt
├── task_manager_db.zip
├── task_manager_db
└── task_manager.sql
├── update-list.php
└── update-task.php
/README.md:
--------------------------------------------------------------------------------
1 | # 🗂️ Task Manager (PHP + MySQL)
2 |
3 | A simple web-based Task Management System built using PHP, MySQL, HTML, and CSS. Ideal for learning CRUD operations, login system, and database integration.
4 |
5 | ## 📌 Features
6 |
7 | - ✅ Create, Read, Update, Delete (CRUD) tasks
8 | - ✅ Organize tasks into custom lists
9 | - ✅ Responsive UI
10 | - ✅ Database-driven using MySQL
11 |
12 | ## 🛠️ Tech Stack
13 |
14 | - Frontend: HTML, CSS
15 | - Backend: PHP
16 | - Database: MySQL
17 | - Server: Apache (XAMPP)
18 |
--------------------------------------------------------------------------------
/add-list.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Task Manager with PHP and MySQL
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
TASK MANAGER
16 |
17 |
Home
18 |
Manage Lists
19 |
20 |
21 |
Add List Page
22 |
23 |
24 |
25 |
37 |
38 |
39 |
40 |
41 |
42 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
--------------------------------------------------------------------------------
/add-task.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Task Manager with PHP and MySQL
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
TASK MANAGER
16 |
17 |
Home
18 |
19 |
Add Task Page
20 |
21 |
22 |
31 |
32 |
33 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
--------------------------------------------------------------------------------
/config/constants.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/css/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | Theme - Task Manager (Revamped)
3 | Version - 2.0
4 | Author - Saseetha
5 | */
6 |
7 | /* Reset and base font */
8 | * {
9 | margin: 0;
10 | padding: 0;
11 | box-sizing: border-box;
12 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
13 | }
14 |
15 | /* Background and container */
16 | body {
17 | background-image: url('https://images.unsplash.com/photo-1508780709619-79562169bc64?auto=format&fit=crop&w=1740&q=80');
18 | background-size: cover;
19 | background-position: center;
20 | background-attachment: fixed;
21 | color: #ffffff;
22 | min-height: 100vh;
23 | }
24 |
25 | /* Centered wrapper with glass effect */
26 | .wrapper {
27 | width: 80%;
28 | margin: 40px auto;
29 | padding: 30px;
30 | background: rgba(0, 0, 0, 0.7);
31 | border-radius: 12px;
32 | box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
33 | }
34 |
35 | /* Headings */
36 | h1, h3 {
37 | color: #f1c40f;
38 | margin-bottom: 20px;
39 | }
40 |
41 | h1 {
42 | font-size: 2.5rem;
43 | border-bottom: 2px solid #f1c40f;
44 | padding-bottom: 10px;
45 | }
46 |
47 | h3 {
48 | font-size: 1.3rem;
49 | }
50 |
51 | /* Navigation menu */
52 | .menu {
53 | margin-bottom: 25px;
54 | }
55 |
56 | .menu a {
57 | color: #f1f1f1;
58 | text-decoration: none;
59 | font-weight: bold;
60 | margin-right: 15px;
61 | padding: 8px 12px;
62 | border-radius: 6px;
63 | background-color: rgba(241, 196, 15, 0.1);
64 | transition: all 0.3s ease;
65 | }
66 |
67 | .menu a:hover {
68 | background-color: #f1c40f;
69 | color: #000;
70 | }
71 |
72 | /* Buttons */
73 | .btn-primary,
74 | .btn-secondary {
75 | padding: 8px 16px;
76 | font-weight: bold;
77 | text-decoration: none;
78 | display: inline-block;
79 | border-radius: 6px;
80 | transition: all 0.3s ease;
81 | }
82 |
83 | .btn-primary {
84 | background-color: #2ecc71;
85 | color: #fff;
86 | }
87 |
88 | .btn-primary:hover {
89 | background-color: #27ae60;
90 | }
91 |
92 | .btn-secondary {
93 | background-color: #34495e;
94 | color: #fff;
95 | }
96 |
97 | .btn-secondary:hover {
98 | background-color: #2c3e50;
99 | }
100 |
101 | .btn-lg {
102 | width: 50%;
103 | }
104 |
105 | /* Tables */
106 | .tbl-full,
107 | .tbl-half {
108 | width: 100%;
109 | border-collapse: collapse;
110 | margin-top: 20px;
111 | }
112 |
113 | .tbl-half {
114 | width: 50%;
115 | }
116 |
117 | table tr th,
118 | table tr td {
119 | padding: 12px;
120 | text-align: left;
121 | border-bottom: 1px solid #ccc;
122 | color: #fff;
123 | }
124 |
125 | table tr th {
126 | background-color: rgba(241, 196, 15, 0.2);
127 | }
128 |
129 | table tr:nth-child(even) {
130 | background-color: rgba(255, 255, 255, 0.05);
131 | }
132 |
133 | /* Scrollbar style (optional) */
134 | ::-webkit-scrollbar {
135 | width: 8px;
136 | }
137 |
138 | ::-webkit-scrollbar-track {
139 | background: rgba(0, 0, 0, 0.4);
140 | }
141 |
142 | ::-webkit-scrollbar-thumb {
143 | background-color: #f1c40f;
144 | border-radius: 10px;
145 | }/* Update and Delete link styles */
146 | .action-link {
147 | font-weight: bold;
148 | padding: 4px 8px;
149 | text-decoration: none;
150 | border-radius: 4px;
151 | transition: all 0.3s ease;
152 | font-size: 0.95rem;
153 | }
154 |
155 | /* Update link style */
156 | .action-update {
157 | color: #ffffff;
158 | background-color: #3498db;
159 | }
160 |
161 | .action-update:hover {
162 | background-color: #2980b9;
163 | color: #fff;
164 | }
165 |
166 | /* Delete link style */
167 | .action-delete {
168 | color: #ffffff;
169 | background-color: #e74c3c;
170 | margin-left: 8px;
171 | }
172 |
173 | .action-delete:hover {
174 | background-color: #c0392b;
175 | color: #fff;
176 | }
177 | /* Stylish action buttons */
178 | .action-link {
179 | font-weight: bold;
180 | padding: 4px 8px;
181 | text-decoration: none;
182 | border-radius: 4px;
183 | transition: all 0.3s ease;
184 | font-size: 0.95rem;
185 | }
186 |
187 | /* Update button */
188 | .action-update {
189 | color: #ffffff;
190 | background-color: #3498db;
191 | }
192 |
193 | .action-update:hover {
194 | background-color: #2980b9;
195 | color: #fff;
196 | }
197 |
198 | /* Delete button */
199 | .action-delete {
200 | color: #ffffff;
201 | background-color: #e74c3c;
202 | margin-left: 8px;
203 | }
204 |
205 | .action-delete:hover {
206 | background-color: #c0392b;
207 | color: #fff;
208 | }/* Action buttons for update and delete */
209 | .action-link {
210 | font-weight: bold;
211 | padding: 4px 10px;
212 | border-radius: 4px;
213 | text-decoration: none;
214 | font-size: 0.9rem;
215 | transition: background-color 0.3s ease;
216 | }
217 |
218 | /* Update button style */
219 | .action-update {
220 | background-color: #3498db;
221 | color: #fff;
222 | }
223 |
224 | .action-update:hover {
225 | background-color: #2980b9;
226 | color: #fff;
227 | }
228 |
229 | /* Delete button style */
230 | .action-delete {
231 | background-color: #e74c3c;
232 | color: #fff;
233 | margin-left: 8px;
234 | }
235 |
236 | .action-delete:hover {
237 | background-color: #c0392b;
238 | color: #fff;
239 | }
240 |
241 |
242 |
--------------------------------------------------------------------------------
/delete-list.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/delete-task.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 | Task Manager with PHP and MySQL
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
TASK MANAGER
17 |
18 |
19 |
20 |
61 |
62 |
63 |
64 |
65 |
66 |
94 |
95 |
96 |
97 |
98 |
Add Task
99 |
100 |
101 |
102 |
103 | S.N. |
104 | Task Name |
105 | Priority |
106 | Deadline |
107 | Actions |
108 |
109 |
110 | 0)
136 | {
137 | //Data is in Database
138 | while($row=mysqli_fetch_assoc($res))
139 | {
140 | $task_id = $row['task_id'];
141 | $task_name = $row['task_name'];
142 | $priority = $row['priority'];
143 | $deadline = $row['deadline'];
144 | ?>
145 |
146 |
147 | . |
148 | |
149 | |
150 | |
151 |
152 | Update
153 | Delete
154 |
155 |
156 | |
157 |
158 |
159 |
166 |
167 |
168 | No Task Added Yet. |
169 |
170 |
171 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/list-task.php:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 | Task Manager with PHP and MySQL
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
TASK MANAGER
19 |
20 |
21 |
62 |
63 |
64 |
65 |
66 |
67 |
Add Task
68 |
69 |
70 |
71 |
72 |
73 | S.N. |
74 | Task Name |
75 | Priority |
76 | Deadline |
77 | Actions |
78 |
79 |
80 | 0)
99 | {
100 | //We have tasks on this list
101 | while($row=mysqli_fetch_assoc($res))
102 | {
103 | $task_id = $row['task_id'];
104 | $task_name = $row['task_name'];
105 | $priority = $row['priority'];
106 | $deadline = $row['deadline'];
107 | ?>
108 |
109 |
110 | 1. |
111 | |
112 | |
113 | |
114 |
115 | Update
116 |
117 | Delete
118 | |
119 |
120 |
121 |
128 |
129 |
130 | No Tasks added on this list. |
131 |
132 |
133 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
--------------------------------------------------------------------------------
/manage-list.php:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 | Task Manager with PHP and MySQL
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
TASK MANAGER
18 |
19 |
20 |
Home
21 |
22 |
Manage Lists Page
23 |
24 |
25 |
59 |
60 |
61 |
62 |
63 |
64 |
Add List
65 |
66 |
67 |
68 | S.N. |
69 | List Name |
70 | Actions |
71 |
72 |
73 |
74 | 0)
102 | {
103 | //There's data in database' Display in table
104 |
105 | while($row=mysqli_fetch_assoc($res))
106 | {
107 | //Getting the data from database
108 | $list_id = $row['list_id'];
109 | $list_name = $row['list_name'];
110 | ?>
111 |
112 |
113 | . |
114 | |
115 |
116 | Update
117 | Delete
118 | |
119 |
120 |
121 |
131 |
132 |
133 | No List Added Yet. |
134 |
135 |
136 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/references.txt:
--------------------------------------------------------------------------------
1 |
2 | 1. List (Group of Tasks)
3 |
4 | tbl_lists
5 |
6 | list_id (PK)
7 | list_name
8 | list_description
9 |
10 |
11 | 2. Tasks
12 |
13 | tbl_tasks
14 |
15 | task_id
16 | task_name
17 | task_description
18 | list_id
19 | priority
20 | deadline
21 |
--------------------------------------------------------------------------------
/task_manager_db.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saseetha/Task-Manager/bad57f5e2ff1e0388431a04dad42fb5e8e17e1c8/task_manager_db.zip
--------------------------------------------------------------------------------
/task_manager_db/task_manager.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 5.0.2
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: 127.0.0.1
6 | -- Generation Time: Jun 01, 2020 at 06:24 PM
7 | -- Server version: 10.4.11-MariaDB
8 | -- PHP Version: 7.4.6
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | START TRANSACTION;
12 | SET time_zone = "+00:00";
13 |
14 |
15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18 | /*!40101 SET NAMES utf8mb4 */;
19 |
20 | --
21 | -- Database: `task_manager`
22 | --
23 |
24 | -- --------------------------------------------------------
25 |
26 | --
27 | -- Table structure for table `tbl_lists`
28 | --
29 |
30 | CREATE TABLE `tbl_lists` (
31 | `list_id` int(10) UNSIGNED NOT NULL,
32 | `list_name` varchar(50) NOT NULL,
33 | `list_description` varchar(150) DEFAULT NULL
34 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
35 |
36 | --
37 | -- Dumping data for table `tbl_lists`
38 | --
39 |
40 | INSERT INTO `tbl_lists` (`list_id`, `list_name`, `list_description`) VALUES
41 | (1, 'To Do', ' All the tasks that must be done soon. '),
42 | (2, 'Doing', ' All the Tasks that are currently being done. '),
43 | (3, 'Done', 'All the Tasks that are completed '),
44 | (7, 'Shopping', 'Tasks for Shopping');
45 |
46 | -- --------------------------------------------------------
47 |
48 | --
49 | -- Table structure for table `tbl_tasks`
50 | --
51 |
52 | CREATE TABLE `tbl_tasks` (
53 | `task_id` int(10) UNSIGNED NOT NULL,
54 | `task_name` varchar(150) NOT NULL,
55 | `task_description` text NOT NULL,
56 | `list_id` int(11) NOT NULL,
57 | `priority` varchar(10) NOT NULL,
58 | `deadline` date NOT NULL
59 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
60 |
61 | --
62 | -- Dumping data for table `tbl_tasks`
63 | --
64 |
65 | INSERT INTO `tbl_tasks` (`task_id`, `task_name`, `task_description`, `list_id`, `priority`, `deadline`) VALUES
66 | (2, 'icon Design', ' This is urgent ', 1, 'High', '2020-06-03'),
67 | (3, 'Buy Things', 'Okay Buy ', 3, 'Medium', '2020-06-12'),
68 | (4, 'Web Page Design', 'All the Tasks for Web Page Design', 1, 'Medium', '2020-06-11'),
69 | (5, 'Application Development', 'All the tasks', 1, 'Low', '2020-07-03'),
70 | (6, 'SEO', 'Search Engine Optimization', 2, 'Medium', '2020-06-19'),
71 | (7, 'Desktop Application Development', 'This is Important', 3, 'Low', '2020-06-26'),
72 | (8, '4K Monitor', 'For Video Editing', 1, 'Medium', '2020-06-18');
73 |
74 | --
75 | -- Indexes for dumped tables
76 | --
77 |
78 | --
79 | -- Indexes for table `tbl_lists`
80 | --
81 | ALTER TABLE `tbl_lists`
82 | ADD PRIMARY KEY (`list_id`);
83 |
84 | --
85 | -- Indexes for table `tbl_tasks`
86 | --
87 | ALTER TABLE `tbl_tasks`
88 | ADD PRIMARY KEY (`task_id`);
89 |
90 | --
91 | -- AUTO_INCREMENT for dumped tables
92 | --
93 |
94 | --
95 | -- AUTO_INCREMENT for table `tbl_lists`
96 | --
97 | ALTER TABLE `tbl_lists`
98 | MODIFY `list_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
99 |
100 | --
101 | -- AUTO_INCREMENT for table `tbl_tasks`
102 | --
103 | ALTER TABLE `tbl_tasks`
104 | MODIFY `task_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
105 | COMMIT;
106 |
107 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
108 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
109 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
110 |
--------------------------------------------------------------------------------
/update-list.php:
--------------------------------------------------------------------------------
1 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | Task Manager with PHP and MySQL
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
TASK MANAGER
63 |
64 |
65 |
66 |
Home
67 |
Manage Lists
68 |
69 |
70 |
71 |
72 |
Update List Page
73 |
74 |
75 |
83 |
84 |
85 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/update-task.php:
--------------------------------------------------------------------------------
1 | Executed
27 | $row = mysqli_fetch_assoc($res);
28 |
29 | //Get the Individual Value
30 | $task_name = $row['task_name'];
31 | $task_description = $row['task_description'];
32 | $list_id = $row['list_id'];
33 | $priority = $row['priority'];
34 | $deadline = $row['deadline'];
35 | }
36 | }
37 | else
38 | {
39 | //Redirect to Homepage
40 | header('location:'.SITEURL);
41 | }
42 | ?>
43 |
44 |
45 |
46 | Task Manager with PHP and MySQL
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
TASK MANAGER
55 |
56 |
57 | Home
58 |
59 |
60 |
Update Task Page
61 |
62 |
63 |
70 |
71 |
72 |
169 |
170 |
171 |
172 |
173 |
174 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
--------------------------------------------------------------------------------