Reply to Re: $_SESSION variable not carrying

Your name:

Reply:


Posted by Good Man on 07/18/07 19:24

"dpinion@gmail.com" <dpinion@gmail.com> wrote in
news:1184785906.714977.76830@x35g2000prf.googlegroups.com:

> Greetings,
> I am trying to do some simple session stuff. However it does not seem
> as though the session variable is being created for my site. I am
> running the latest version of PHP and apache that I installed as part
> of WAMP. Machine is XP SP2.
>
> Basically I am trying to do something simple such as:
>
> <?php
>
> // initialize a session
> session_start();
>
> // increment a session counter
> $_SESSION['counter']++;
>
> // print value
> echo "You have viewed this page " . $_SESSION['counter'] . " times";

you don't see your new session/cookie value until you call it from the
NEXT/FOLLOWING page.

Also, this might make more sense:
$_SESSION['counter'] = $_SESSION['counter']++;

[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

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