I have been trying to get sessions to work with no luck. Here's some code that i'm using for putting into session and session variable retrieval. If anyone can tell me what's wrong or what i didn't do. and yes I am putting session_start(); on each page but with no success. Thanks for any input.
<?php session_start();
$_SESSION["Name"];
$_SESSION["Email"];
?>
Variable Retrieval:
<?php echo $_SESSION["Name"];?>
Please Help.
Session Problems
Moderator: General Moderators
Re: Session Problems
i got the same problem too..any help?
- jthermane24
- Forum Newbie
- Posts: 16
- Joined: Wed Feb 17, 2010 8:15 pm
- Location: New Jersey
Re: Session Problems
try using single quotes not double quotes
-
nblackwood
- Forum Newbie
- Posts: 4
- Joined: Wed Feb 17, 2010 2:12 am
Re: Session Problems
that made no difference
Re: Session Problems
Are you setting your session variables at all?
Code: Select all
<?php
session_start();
$_SESSION['name'] = 'MyName';
$_SESSION['email'] = 'MyEmail';
$_SESSION['time'] = time();
print_r($_SESSION);
?>Re: Session Problems
oh, that's it..i think i've got it..