0% found this document useful (0 votes)
36 views8 pages

Full PHP ToDo List Report

The document outlines a PHP-based To-Do List application that allows users to manage tasks through a web interface, utilizing MySQL for data storage. It details the project's objectives, methodology, and code structure, emphasizing the integration of server-side scripting and database manipulation. The project serves as a foundational exercise for beginner-level full-stack development within the LAMP stack.

Uploaded by

nishika235p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views8 pages

Full PHP ToDo List Report

The document outlines a PHP-based To-Do List application that allows users to manage tasks through a web interface, utilizing MySQL for data storage. It details the project's objectives, methodology, and code structure, emphasizing the integration of server-side scripting and database manipulation. The project serves as a foundational exercise for beginner-level full-stack development within the LAMP stack.

Uploaded by

nishika235p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

PHP Simple To-Do List Project Report

ABSTRACT

This project demonstrates a web-based To-Do List application using PHP and HTML5. It enables users to

manage their daily tasks effectively. By leveraging MySQL for storage, and HTML5/CSS for the front-end,

this simple application lays a strong foundation for beginner-level full-stack development using the LAMP

stack.

OBJECTIVE

To design and implement a basic task-listing web application that performs Create, Read, and Delete

operations using PHP. The project aims to solidify understanding of server-side scripting, form handling,

database manipulation, and basic front-end integration.

INTRODUCTION

Task management systems are widely used in productivity applications. This project focuses on implementing

one such system using PHP. We use procedural PHP along with MySQL to build a lightweight but functional

To-Do list app. The goal is not only to build an app but to understand how the components interact.

METHODOLOGY

Tools Used:

- PHP: Server-side logic for processing user actions.

- MySQL: Relational database to store the list of tasks.

- HTML5 & CSS: Front-end interface for input and display.

- XAMPP: Local server environment for development.

Steps Followed:
PHP Simple To-Do List Project Report

1. Set up the database with a table to store tasks.

2. Build the main interface with a form to add tasks and list to display them.

3. Create PHP scripts for adding and deleting tasks using POST and GET methods.

4. Connect the scripts to the database using MySQLi functions.

5. Use basic CSS to style the UI.

6. Test locally using the XAMPP server.

CODE

db.php
<?php
$servername = "localhost";
$username = "root";
$password = "";
$database = "todo_app";

$conn = mysqli_connect($servername, $username, $password, $database);

if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
?>

index.php
<?php
include("db.php");
$result = mysqli_query($conn, "SELECT * FROM todos ORDER BY id DESC");
?>
<!DOCTYPE html>
<html>
<head>
<title>Simple To-Do List</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container">
<h1>To-Do List</h1>
<form method="POST" action="add.php">
<input type="text" name="task" required placeholder="Add new task">
<button type="submit">Add</button>
</form>
PHP Simple To-Do List Project Report

<ul>
<?php while ($row = mysqli_fetch_assoc($result)) { ?>
<li>
<?php echo htmlspecialchars($row['task']); ?>
<a href="delete.php?id=<?php echo $row['id']; ?>">Delete</a>
</li>
<?php } ?>
</ul>
</div>
</body>
</html>

add.php
<?php
include("db.php");

if (isset($_POST['task'])) {
$task = mysqli_real_escape_string($conn, $_POST['task']);
mysqli_query($conn, "INSERT INTO todos (task) VALUES ('$task')");
}
header("Location: index.php");
exit();
?>

delete.php
<?php
include("db.php");

if (isset($_GET['id'])) {
$id = (int)$_GET['id'];
mysqli_query($conn, "DELETE FROM todos WHERE id = $id");
}
header("Location: index.php");
exit();
?>

css/style.css
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
padding: 20px;
}

.container {
max-width: 500px;
margin: auto;
background: white;
PHP Simple To-Do List Project Report

padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

input[type=text] {
padding: 10px;
width: 70%;
margin-right: 10px;
}

button {
padding: 10px 20px;
}

ul {
list-style-type: none;
padding: 0;
}

li {
margin: 10px 0;
display: flex;
justify-content: space-between;
}

SCREENSHOTS
PHP Simple To-Do List Project Report
PHP Simple To-Do List Project Report
PHP Simple To-Do List Project Report

CONCLUSION

This project successfully demonstrates the integration of PHP with MySQL to build a dynamic,

database-driven application.

It not only serves as an academic project but also as a practical guide to implementing real-world logic in web

applications.

Key Learnings:

- How to handle HTML forms with PHP.

- Use of procedural PHP to connect with a database.


PHP Simple To-Do List Project Report

- SQL commands for inserting, reading, and deleting records.

- UI/UX considerations for beginner-level web apps.

Future Scope:

- Implement login and user session management.

- Task categorization and tagging.

- Due dates and reminders with email or SMS alerts.

- Marking tasks as completed or pending.

This application lays the groundwork for more advanced full-stack projects.

You might also like