jason360 Posted July 5, 2012 Share Posted July 5, 2012 Hey guys, Any idea how to add a cookie to this string? $_COOKIE['first'] Thanks <?php echo $_SESSION['first'] ? $_SESSION['first']: 'Guest';?> Link to comment https://forums.phpfreaks.com/topic/265251-cookies-in-php-script/ Share on other sites More sharing options...
jason360 Posted July 5, 2012 Author Share Posted July 5, 2012 This worked: if(isset($_COOKIE['user_id'])) { $_SESSION['user_id'] = $_COOKIE['user_id']; } Link to comment https://forums.phpfreaks.com/topic/265251-cookies-in-php-script/#findComment-1359446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.