Answers for "codeigniter set session"

PHP
1

print all session in codeigniter

print_r($this->session->userdata); 

or

print_r($this->session->all_userdata());
Posted by: Guest on August-22-2020
0

load session in codeigniter

$this->load->library('session');
Posted by: Guest on September-03-2021
0

how to free session variable in php codeigniter

$this->session->unset_userdata('some_name');
Posted by: Guest on May-30-2020
0

codeigniter login system with session

<!DOCTYPE html>  
 <html>  
 <head>  
      <title>Webslesson | <?php echo $title; ?></title>  
      <link rel="stylesheet" 

href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />  
 </head>  
 <body>  
      <div class="container">  
           <br /><br /><br />  
           <form method="post" action="<?php echo base_url(); ?>main/login_validation">  
                <div class="form-group">  
                     <label>Enter Username</label>  
                     <input type="text" name="username" class="form-control" />  
                     <span class="text-danger"><?php echo form_error('username'); ?

></span>                 
                </div>  
                <div class="form-group">  
                     <label>Enter Password</label>  
                     <input type="password" name="password" class="form-control" />  
                     <span class="text-danger"><?php echo form_error('password'); ?

></span>  
                </div>  
                <div class="form-group">  
                     <input type="submit" name="insert" value="Login" class="btn btn-info" />  
                     <?php  
                          echo '<label class="text-danger">'.$this->session->flashdata

("error").'</label>';  
                     ?>  
                </div>  
           </form>  
      </div>  
 </body>  
 </html>
Posted by: Guest on July-29-2020

Code answers related to "codeigniter set session"

Browse Popular Code Answers by Language