Welcome Guest, Not a member yet? Register   Sign In
Native session in CI 3
#1

Hello guys,
I want to ask , why native session can not be used in CI 3. erornya like this

PHP Code:
A session had already been started ignoring session_start() 

what should i have to doit if i want use native, my script like this

PHP Code:
<?php 
// print_r($_SESSION);
 
$_SESSION['username'] = $this->session->userdata('nama');
$usr $_SESSION['username']; // Must be already set
session_start();
$_SESSION['username'] = $usr;

// echo $_SESSION['username'];
?>
Reply
#2

If you initialize the session library, there should be no reason for you to use session_start() again.

http://www.codeigniter.com/user_guide/li...ssion-data
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB