http_session_vars undefined index in other page. y??????

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chester
Forum Newbie
Posts: 1
Joined: Tue Mar 09, 2004 8:39 am

http_session_vars undefined index in other page. y??????

Post by chester »

:?:

CHESTER

HELP!!!!!!!!!!

when i run the three pages- i used session_start and session_register but when i call it to the third page. the message is Undefined index of that variable i posted in session.....

anyone could help me???????
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Does this test work?

Code: Select all

<?php 
session_start(); 
if(empty($_SESSION['count'])){ 
  $_SESSION['count'] = 1; 
} else { 
  ++$_SESSION['count']; 
} 
echo 'Count is : '.$_SESSION['count']; 
?>
It should increment the counter on each page reload. The outcome will help determine where your problem is.
Post Reply