<?php
require_once __DIR__ . '/../config/user_functions.php';

session_start();
$lang = $_GET['lang'] ?? 'en';
$_SESSION['lang'] = ($lang === 'es') ? 'es' : 'en';
header("Location: " . ($_SERVER['HTTP_REFERER'] ?? '/smproduce/index.php'));
exit;
?>
