PHP Classes

File: language.set.php

Recommend this page to a friend!
  Classes of Dannel   PHP Language Change   language.set.php   Download  
File: language.set.php
Role: Auxiliary script
Content type: text/plain
Description: Lang script to set the cookie
Class: PHP Language Change
Change application language using arrays of text
Author: By
Last change:
Date: 4 years ago
Size: 940 bytes


Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">


$lang= $_POST['l'];
$cookie_name = "lang";
setcookie($cookie_name, $lang, time() + (86400), "/");
header("Location: example.php");

<fieldset><legend>Idioma Preferido / Preferred Language</legend>
<form action="" method="POST">
<select name="l">
<option value="esp">Espa&ntilde;ol</option>
<option value="eng">English</option>
<input type="submit" value="OK"/>