Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 28th, 2005, 11:37 AM   #1
DigitalSeraph
Newbie
 
Join Date: Nov 2005
Location: Atlanta,GA USA
Posts: 1
Rep Power: 0 DigitalSeraph is on a distinguished road
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
DigitalSeraph is offline   Reply With Quote
Old Nov 28th, 2005, 12:32 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
session_start(); must be called before any output is sent.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 28th, 2005, 10:44 PM   #3
Lich
Professional Programmer
 
Lich's Avatar
 
Join Date: May 2005
Location: Detroit
Posts: 254
Rep Power: 4 Lich is on a distinguished road
Send a message via AIM to Lich Send a message via MSN to Lich
move the <?php to line 1
__________________
--John Cruz
Web Developer
www.cruzweb.net
Lich is offline   Reply With Quote
Old Nov 29th, 2005, 6:32 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Quote:
Originally Posted by Lich
move the <?php to line 1
Nice one. How'd ya manage to spot that?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:00 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC