>>23

<?php
$pdo = db_connect();
if(isset($_GET['action']) && $_GET['action'] == 'delete' && $_GET['id'] > 0){
try{
$pdo->beginTransaction();
$id = $_GET['id'];
$sql = "DELETE FROM todo WHERE id=:id";
$stmh = $pdo->prepare($sql);
$stmh->bindValue(':id',$id,PDO::PARAM_INT);
$stmh->execute();
$pdo->commit();
require_once "todo_test.php";
} catch(PDOException $Exception) {

print "エラー:".$Exception->getMessage();
}
}
?>
</body>
</html>