1st of all here's my code
Code: Select all
<?php
session_start();
if (!isset($_SESSION['lang'])) {
$_SESSION['lang'] = 'en';
}
else
{
$received_lang = $_GET['lang'];
$_SESSION['lang']=$received_lang;
}
?>when I run the code, I get the following warning
[text]Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0[/text]
Ok, I got the point that I shouldn't use $_GET[] super global, but what's the other option that I have??