![]() |
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 |
session_start(); must be called before any output is sent.
|
move the <?php to line 1
|
Quote:
|
| All times are GMT -5. The time now is 8:46 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC