0% found this document useful (0 votes)
13 views5 pages

Integrative Programming Technology I PHP

The document outlines a simple PHP project to create a basic to-do list application. It includes code for initializing tasks, adding new tasks via a form, and saving/loading tasks from a file. The project aims to introduce users to programming concepts in PHP while encouraging further exploration of the field.

Uploaded by

Rovin Garcia
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)
13 views5 pages

Integrative Programming Technology I PHP

The document outlines a simple PHP project to create a basic to-do list application. It includes code for initializing tasks, adding new tasks via a form, and saving/loading tasks from a file. The project aims to introduce users to programming concepts in PHP while encouraging further exploration of the field.

Uploaded by

Rovin Garcia
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/ 5

PHP

PROGRAMMING

Integrative Programming Language


SIMPLE TO DO LIST

This project will create a basic to-do list application using PHP.
1. Create a File:
Create a new file named todo_list.php.
<?php
// Initialize an array to store tasks
$tasks = array();
// Check if the form has been submitted
if (isset($_POST['submit'])) {
// Get the task from the form
$new_task = $_POST['task'];
// Add the task to the array
$tasks[] = $new_task;
// Save the tasks to a file (optional)
file_put_contents('tasks.txt', serialize($tasks));
}
// Load tasks from file (if exists)
if (file_exists('tasks.txt')) {
$tasks = unserialize(file_get_contents('tasks.txt'));
}
?>
<!DOCTYPE html> <button type="submit"
<html> name="submit">Add</button>
<head> </form>
<title>To-Do List</title> <ul>
</head> <?php foreach ($tasks as $task) :
<body> ?>
<li>
<h1>To-Do List</h1> <?php echo $task;
<form method="post" action=""> ?>
</li> <?php endforeach;
<input type="text" name="task"
?>
placeholder="Add a task">
</ul>
</body>
</html>
WE APPRECIATE
YOUR TIME!
Thank you for exploring the world of programming with us. We
sincerely hope this presentation has inspired you to dive deeper into
this exciting and ever-evolving field.

You might also like