Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie Problem

Status
Not open for further replies.

James1981

Programmer
Nov 2, 2002
76
US
Hi,

I'm trying to create some cookies but I get this error:

Warning: Cannot send session cookie - headers already sent by (path)

I am using the following code:

session_start();
session_register("session_user_id");
session_register("session_username");
session_register("session_email");
session_register("session_access_level");
session_register("session_signup_date");
session_register("session_private_messages");

Any ideas anyone?

Thanks in advance
James.
 
The session_start(); has to be the first line of your script. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top