10 lines
274 B
PHP
Raw Permalink Normal View History

2021-04-20 17:05:13 +02:00
<?php
session_start();
if (isset($_POST['language'])) {
$cookie_name = 'language';
$cookie_value = $_POST['language'];
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
$_SESSION['language'] = $_POST['language'];
}
header('Location: /');
?>