<?PHP if (isset($_GET['yes'])) { session_start(); $_SESSION['res'] = '<div class = "error" style ="background-color: #3da33c;">Реклама добавлена</div>'; header("Location: /"); exit(); } require __DIR__ . "/../connect/connect.php"; if (isset($_POST['label']) && !empty($_POST['label'])) { $label = openssl_decrypt($_POST['label'], 'AES-128-CBC', $rand_val); $stmt = $pdo->prepare("UPDATE reklama SET activ = 1 WHERE id = :id"); $stmt->bindParam(':id', $label, PDO::PARAM_INT); $stmt->execute(); exit(); } ?>