Dodaj 'mark.php'
This commit is contained in:
parent
448c0b9b74
commit
fcbd8b6f92
17
mark.php
Normal file
17
mark.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
session_start();
|
||||
$db_servername = 'localhost';
|
||||
$db_login_tasks = '';
|
||||
$db_password_tasks = '';
|
||||
$db_name_tasks = '';
|
||||
|
||||
$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');
|
||||
?>
|
Loading…
Reference in New Issue
Block a user