diff --git a/blog_details.php b/blog_details.php index 030918e..46d4067 100644 --- a/blog_details.php +++ b/blog_details.php @@ -64,11 +64,12 @@ }else { $login_user_id = NULL; } + + // check if the logged-in user is the blog owner or an admin if ($login_user_id === $user_id) { $show_delete_button = true; } - // check if the user is an admin $user_type = ''; if (isset($_COOKIE['login_user_id'])) { $sql = "SELECT * FROM users WHERE user_id='$login_user_id' "; diff --git a/login.php b/login.php index 09d2ca0..6840a00 100644 --- a/login.php +++ b/login.php @@ -1,6 +1,12 @@