K, i am use to using Sessions in ASP and I am having some probelms with the Sessions in PHP. WHat i want to do is use a session to check if a person if loged in or not on all of the pages that you need to be loged in for.
When i use session_start() i get this error
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\Web Stuff\PHP\2Computergeeks\editusers.php:1) in D:\Web Stuff\PHP\2Computergeeks\editusers.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\Web Stuff\PHP\2Computergeeks\editusers.php:1) in D:\Web Stuff\PHP\2Computergeeks\editusers.php on line 3
Notice: Undefined variable: _session in D:\Web Stuff\PHP\2Computergeeks\editusers.php on line 4
This is the code that i am using when i get the error
<?php
session_start();
if (!$_session['login'] == "true"){
If i remove the session_start then i get the Undefined variable: _session error still. I just need to know the basics of using sessions. I am having a hard time finding any info on how to use sessions in PHP. THanks for any help.
PS. do i have to do a Session_start on every page that i want to use Sessions on? and do i have to register sessions before i can use them? I get error when i do session start and when i do a session register. Thanks
PS2. I am using the newest version of PHP.