Solved

sessions won't work

Posted on 2004-09-07
2
212 Views
Last Modified: 2006-11-17
i have a linux / unix host and i can't get sessions to work. i am using this variable

$_SESSION['Login']

i am just trying a simple echo

echo $_SESSION['Login'];

i don't get anything why?
0
Comment
Question by:Paul S
2 Comments
 
LVL 25

Accepted Solution

by:
Squinky earned 50 total points
ID: 12003902
You have called session_start() before this haven't you? You have put something into $_SESSION['Login'] that's visible?
0
 
LVL 11

Author Comment

by:Paul S
ID: 12017687
thank you for your help. I was making a dumb mistake. i am fairly new to php. I was calling session_start() on the page that i created the session variable on, but i wasn't calling session_start() on the page the was suppose to read the variable. I just added session_start to an include file and included it at the start of every page.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now