<?php session_start(); include 'sql/db_login.php'; $db = mysqli_connect("$db_servername", "$db_login_tasks", "$db_password_tasks", "$db_name_tasks"); if (isset($_GET['mark_task']) && $_SESSION['zalogowany'] = true) { $login = $_SESSION['login']; $id = $_GET['mark_task']; mysqli_query($db, "UPDATE `tasks_$login` SET done = 1 WHERE ID = $id"); } header('Location: index.php'); ?>