I am searching help for display content as per variable passed through $_GET method.
details for files are as follows
// content of content.php
<?php
if ($_SESSION['lang']=="np")
{
print "content based on language=np \n";
print "<a href='language.php?lang=np>change language</a> \n";
}
else
{
print "content based on language !=np \n";
print "<a href='language.php?lang=np>change language</a> \n";
}
?>
//content of index.php
<?php
global $lang;
if (!isset($_SESSION['lang'])) session_start();
include "content.php";
?>
//content of language.php
<?php
$lang = $GET['lang'];
$SESSION['lang'] = $lang;
header("Location:". $_SERVER['HTTP_REFERER']);
?>
Above codes are not work properly. Please help me