You are here: Re: I do not understand why... « All PHP « IT news, forums, messages
Re: I do not understand why...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация