From 8b7141e2c14b2ed3c8f8d37ead0b4fc0ab704c5f Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 30 Aug 2023 20:19:21 +0300 Subject: [PATCH] keep last post data in the form values --- src/public/edit.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/public/edit.php b/src/public/edit.php index 7d9759c..4d2e0e3 100644 --- a/src/public/edit.php +++ b/src/public/edit.php @@ -400,6 +400,12 @@ else { { // Refresh magnet data $magnet = $db->getMagnet($magnet->magnetId); + + // Replace fields by last POST data + foreach ($_POST as $key => $value) + { + $magnet->{$key} = $value; + } } }