php_pracownia-programowania/delete.php

15 lines
377 B
PHP
Raw Permalink Normal View History

2018-12-30 01:18:56 +01:00
<?php
session_start();
2018-12-30 01:29:20 +01:00
include 'sql/db_login.php';
2018-12-30 01:18:56 +01:00
$db = mysqli_connect("$db_servername", "$db_login_tasks", "$db_password_tasks", "$db_name_tasks");
if (isset($_GET['del_task']) && $_SESSION['zalogowany'] = true) {
$login = $_SESSION['login'];
$id = $_GET['del_task'];
mysqli_query($db, "DELETE FROM `tasks_$login` WHERE ID = $id");
}
header('Location: index.php');
?>