10 lines
274 B
PHP
10 lines
274 B
PHP
|
<?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: /');
|
||
|
?>
|