Session Problem
Moderator: General Moderators
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
right. Now - look at that code on the previous page. See how $errorMessage is set after two separate if statements. If one of those fails then its not set. Obviously one is failing. I would guess the second, because we already fixed the first. Anyways, unless
<?php echo "$errorMessage"; ?>
has is not allowed to run unless $errorMessage is set, it will generate errors. So you have to either find out why $errorMessage is not getting set, or limit the above line to run only when errorMessage is set.
<?php echo "$errorMessage"; ?>
has is not allowed to run unless $errorMessage is set, it will generate errors. So you have to either find out why $errorMessage is not getting set, or limit the above line to run only when errorMessage is set.
Similar Problem
Hello - Similar Problem
In a.php I have
In b.php I have
This is what I get :
Notice: Undefined variable: _SESSION in b.php on line 1
register_globals = On. I'm using php4.3.4
Can anyone help me out here ?
Thanks
In a.php I have
Code: Select all
<?php
session_module_name("user");
session_set_save_handler("session_open","session_close","session_read","session_write","session_remove","session_gc");
session_start(); // Rest of the session fns are working including $PHPSESSID
$_SESSION['count']=5;
header("Location:b.php");
.
.
<session fns>
.
.Code: Select all
<?php
print($_SESSION['count']);
?>Notice: Undefined variable: _SESSION in b.php on line 1
register_globals = On. I'm using php4.3.4
Can anyone help me out here ?
Thanks
Variable not declared
I did that too : session_start();
In that case it is showing that count is not declared
In that case it is showing that count is not declared