Question: Hello I need help getting my delete and additem button to work. The delete button needs to use the file delete_record.php and the add item
Hello I need help getting my delete and additem button to work. The delete button needs to use the file delete_record.php and the add item button needs to use the file add_item.php.. The problem I am running into is that neither button is wanting to post anything. The AddItem button needs to post new information to an sql server called todolistand a table named todoitems. The delete button needs to delete those records if the user so wishes from the database. Each time the button is clicked it should send the user back to the index.php page. The todolist and todoitems have the followers columns ItenNum - int(11), Title - varchar(20), and Description - varchar(50). Below is the files I need fixed.
Index.php:
require('database.php');
//post data
$newTitle = filter_input(INPUT_POST, 'newTitle', FILTER_UNSAFE_RAW);
$description = filter_input(INPUT_POST, 'description', FILTER_UNSAFE_RAW);
//Get Data
$title = filter_input(INPUT_GET, 'tile', FILTER_UNSAFE_RAW);
$query = 'SELECT * FROM todoitems';// PUT YOUR SQL QUERY HERE
// Example: $query = 'SELECT * FROM customers';
$statement = $db->prepare($query);
$statement->execute();
$results = $statement->fetchAll();
$statement->closeCursor();
?>
ToDoList
Title:
Description:
