Jump to content

session start and cookie


calmchess

Recommended Posts

I'm trying to use the following to start a session and set cookies but I get header errors when i try to specify them both. how do i set both a session and a cookie?

<?function setcookies(){setcookie("cookname", $_SESSION['username'], time()+60*60*24*100, "/");setcookie("cookpass",$_SESSION['password'], time()+60*60*24*100, "/");session_start();}?>

Link to comment
https://forums.phpfreaks.com/topic/150078-session-start-and-cookie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.