summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-02-13 00:07:43 +0200
committerkartofen <mladenovnasko0@gmail.com>2023-02-13 00:07:43 +0200
commit1610a267640c8da730a9afe5d8bff3867640e779 (patch)
tree3e60441df9d339861a7dae066399ef373b39ff4f
parent372e59955a47ff8387bea445d08516d861d9b5b4 (diff)
fix
-rw-r--r--index.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/index.php b/index.php
index cccb320..2bb8de8 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
<?php
- $ARGS = $_POST;
+ $ARGS = $_GET;
if(count($ARGS) == 0) {
$ARGS = json_decode($_COOKIE["tasks"], true);
@@ -25,7 +25,7 @@
</style>
</head>
<body>
- <form action="index.php" method="post">
+ <form action="index.php" method="get">
<?php
$tasks = $ARGS["tasks"] ?? "0";
@@ -59,6 +59,8 @@
$isdone = $done == "t";
echo "<li> <p>";
+ echo "<input type=\"hidden\" name=\"task_". $j ."_done\" value=\"". $done ."\">";
+
echo "<button type=\"submit\" name=\"task_". $j ."_done\" value=\"". ($isdone ? "f" : "t") ."\">". ($isdone ? "Not Done" : "Done" ) ."</button>";
echo "<button type=\"submit\" name=\"task_delete\" value=\"". $j ."\">Delete</button>";
echo "<button type=\"submit\" name=\"task_edit\" value=\"". ($editing ? "" : $j) ."\">". ($editing ? "Save" : "Edit") ."</button>";
@@ -66,7 +68,6 @@
echo "<input class=\"". ($editing ? "" : "hidden") ."\" name=\"task_". $j ."_text\" value=\"". $task_text ."\">";
echo "<span class=\"". ($editing ? "hidden" : "") ." text done_". $done ."\">". $task_text ."</span>";
- echo "<input type=\"hidden\" name=\"task_". $j ."_done\" value=\"". $done ."\">";
echo "</p> </li>";
}
echo "</ul>";
@@ -75,7 +76,7 @@
echo "<input type=\"hidden\" name=\"tasks\" value=\"". $tasks ."\">";
?>
</form>
- <form action="index.php" method="post">
+ <form action="index.php" method="get">
<button type="submit" name="clear" value="t">Delete Everything</button>
</form>
</body>