|
Posted by Frits van Leeuwen on 10/04/06 06:40
> > > Links:
> > > Flag En: <a href="/language.php?ln=en">English</a>
> > > Flag Du: <a href="/language.php?ln=du">Dutch</a>
> > >
> > > In all headers on index, etc.
> > >
> > > <?
> > > switch ($_COOKIE[LeeuwendeelTaal]))
> > > {
> > > case 'en':
> > > // LOAD ENGLISH
> > > break;
> > > case 'du':
> > > // LOAD DUTCH
> > > break;
> > > default:
> > > // LOAD ENGLISH
> > > break;
> > >
> > > ?>
> > >
> > > // Cookie page: language.php
> > > <?
> > > unset($_COOKIE[LeeuwendeelTaal]);
> > > switch ($_GET[ln])
> > > {
> > > case 'en':
> > > $language = "en";
> > > break;
> > > case 'du':
> > > $language = "du";
> > > break;
> > > default:
> > > $language = "en";
> > > break;
> > > }
> > > setcookie("LeeuwendeelTaal", $language, time()+360000);
> > > header("Location: index.php");
> > > header("Connection: close");
> > > exit;
> > > ?>
> > >
> > I'll give it a try.
> > with //LOAD ... do you mean a html page in one of the languages?
> >
> When I use header("Location: index.php"); the cookie will be not set.
> What's wrong?
>
When I do not use header("Location: index.php"); the cookie will be set.
But I think, I need this line somewere.
Navigation:
[Reply to this message]
|