problem when mixing session in PHP with ajax
dear all,
i just start my way to learn AJAX
i am using a simple framework
AJAXGOLD.JS
i am tryin to make an application that combine the use of AJAX with session in PHP. but i got this message, when i do the 'session'-ing
this is the warning.
Code:
Warning:
Cannot send session cache limiter - headers already sent
(output started at c:\apache\htdocs\ajax\lat2_ajaxgold\chat.php:3) in
c:\apache\htdocs\ajax\lat2_ajaxgold\chat.php on line 6
if there is any idea of how to handle session + AJAX,
or give the links, i'd be very thankful
rgrds,
szpilman
Re: problem when mixing session in PHP with ajax
When I call the function session_start() but before calling it some thing is going to be print on browser then this warning shown. For example
Code:
<html>
<?
if(!isset($_SESSION))
session_start();
?>
</html>
This will show a warning!
But following code will not show warning:
Code:
<?
if(!isset($_SESSION))
session_start();
?>
<html>
......................
</html>
Re: problem when mixing session in PHP with ajax
thnx Badar :)
u got it right. i have corrected my code. some of the errors were also caused by incompatibilities in PHP functions that i used in my PHPTriad :( but i have resolved it. thnx badar :)