From 1a942279ec6c37efd5278457b96e18e1fdbb523b Mon Sep 17 00:00:00 2001 From: s426231 Date: Sun, 18 Nov 2018 13:00:46 +0100 Subject: [PATCH] Edit files fix --- admin-zone/edit.php | 3 ++- admin-zone/update_post.php | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 admin-zone/update_post.php diff --git a/admin-zone/edit.php b/admin-zone/edit.php index 9bc589f..a19114c 100644 --- a/admin-zone/edit.php +++ b/admin-zone/edit.php @@ -41,11 +41,12 @@ else{ -
+
prepare( "SELECT tytul,opis,tekst FROM post WHERE post_id= ?;")) { $sql->bind_param("i" ,$post_id); diff --git a/admin-zone/update_post.php b/admin-zone/update_post.php new file mode 100644 index 0000000..98eb9e6 --- /dev/null +++ b/admin-zone/update_post.php @@ -0,0 +1,25 @@ +prepare("UPDATE post SET tytul=?,opis=?,tekst=?,data_modyfikacji=? WHERE post_id=?;"); +if ($sql) +{ + $sql->bind_param("isssi",$title,$meta_desc,$text,$mod_date,$post_id); + $sql->execute(); + $sql->close(); +} +$mysqli->close(); + +//header ("Location: http://localhost/TAS-ALFA/admin-zone/"); +?> \ No newline at end of file