Hi guys,
I am having problems with setting sessions, I would really appreciate if you someone can help me out.
Basically, I have first page which is an html page which contains user/password input boxes. Users must provide username/password. I used POST to send those parameters to PhP code (admin.php) which actually checks if the user exists in MySQL DB.
In my admin.php I want to start new session, so I do the following:
<?
session_start();
global $user, $passwd;
session_register('user');
session_register('password');
...
..
?>
For some reason, if I add the above line, when I press submit button on the first page, where I supply username/password, I get the following message:
Warning: Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\demo\admin.php:1) in c:\inetpub\wwwroot\demo\admin.php on line 2
Any ideas why is it happening?
Thank you!