<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
<head>
<title>Example</title>
</head>
<body>
<?php
if(isset($_REQUEST['ref'])){$ref=$_REQUEST['ref'];}else{$ref="";};
if(isset($_POST['l'])){
$lang= $_POST['l'];
$cookie_name = "lang";
setcookie($cookie_name, $lang, time() + (86400), "/");
sleep(2);
header("Location: example.php");
?>
<?php
}else{
?>
<fieldset><legend>Idioma Preferido / Preferred Language</legend>
<form action="" method="POST">
<select name="l">
<option value="esp">Español</option>
<option value="eng">English</option>
</select>
<input type="submit" value="OK"/>
</form>
</fieldset>
<?php
}
?>
</body>
</html>
|