You are here: Re: setcookie() or header() « All PHP « IT news, forums, messages
Re: setcookie() or header()

Posted by Steve on 10/06/06 14:06

| 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.

 

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

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