Jump to content

PHP Cookies


Drezard

Recommended Posts

Hello, Im using this code to create a cookie:

[CODE]
<?php
$user = $_SESSION['userinfo'];
setcookie('user', $user, time()+36000*24*365);
session_destroy();
?>
[/CODE]

In a past script that redirects to this one, it sets 'userinfo' as $user. So is this correct (its at the very top of the script).

- Cheers, Daniel
Link to comment
https://forums.phpfreaks.com/topic/20843-php-cookies/
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.