Reply to Re: setcookie() or header()

Your name:

Reply:


Posted by Frits van Leeuwen on 10/08/06 22:08

>| DON'T USE COOKIES.
> |
> | instead use $_SESSION
> |
> | problem solved.
>
> as in:
>
> <?
> session_start();
> if ($showLanguage = $_SESSION['showLanguage'])
> {
> echo '<pre>' . $_SESSION['language'] . '</pre>';
> } else {
> $_SESSION['showLanguage'] = 1;
> $_SESSION['language'] = 'EUBONICS';
> header('location:' . $_SERVER['PHP_SELF']);
> exit;
> }
> ?>
>
> // start sermon
>
> that wasn't too hard, was it. i'd think with all the responses you got
> telling you to do the same thing - use $_SESSION - you'd have invested
> enough interest in the answers for you to want to *read* about session
> variables...instead of the above spoon-feeding.
>
> // end sermon
>
> hth anyway.
>
If I use this, are my visirors at the second time they vissit my site going
in without choosing the language?
How does my site know the last chooise?
sorry for my English, I hope you understand my question.

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
4017 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!

[Back to original 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

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