![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2005
Location: Atlanta,GA USA
Posts: 1
Rep Power: 0
![]() |
session_start() problem
ok, i have a mysql database holding the user info
i also have a script which changes the user's info.this script is in its own file(changeinformation.php) i have to call start_session() to get the session variables to change them.once these vars are loaded, the databse is then updated with the changed variables. i keep getting this error tho: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /mnt/web_f/d40/s09/b0263a64/www/changeInfo.php:2) in /mnt/web_f/d40/s09/b0263a64/www/changeInfo.php on line 3 Problem here is the code for it: 1 2<?php 3 session_start(); 4 5 if (isset($_SESSION['username'])) 6 { 7 get info and do stuff 8 }else 9 exit; 10 } ?> this isnt the actual code, im just showing you where session_start() is in the code. please help
__________________
Linux: Because a PC is a terrible thing to waste. --(By komarimf@craft.camp.clarkson.edu, Mark Komarinski) "I'm the master of low expectations." --George W. Bush |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
session_start(); must be called before any output is sent.
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
move the <?php to line 1
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|