Page 1 of 1

sesion error

Posted: Fri May 24, 2002 4:57 am
by Gavski
I am trying to post session variables:-



session_register("varname");
echo "<INPUT='TEXT' NAME='varname'>...etc..SUBMIT.

the variable is saved and transfered to the next page fine,
but at the beginning of the first page I get an error:-

Warning: Cannot send session cookie - headers already sent by(c:\pathname......)

This is on a localintranet- Apache server setup

Anyone know why I'm geting this error????

Thanks

Posted: Fri May 24, 2002 6:08 am
by volka
You must not send even a single character of the content before you're using session_start()

Code: Select all

<html><?php session_start().....
that doesn't work

Posted: Fri May 24, 2002 3:36 pm
by Gavski
Yea, thanks Volka, works fine now, sweet