View all courses
Read more
The Language Which does not need any prior knowledge of Programming and Easy to learn .Python is Object-oriented ,interpreted and Server side Scripting language . It is mainly used for lynux platform.
In Advance concept After learning Core Python We will use Python to create Desktop Application, Web Application, Sockets Programming , Multithread Programming. Since its An Open source Language its free of Cost
Ruby is server side, dynamic, reflective, object-oriented, general-purpose programming language. Ruby is "an interpreted scripting language for quick and easy object-oriented programming"
Ruby on Rails, or simply Rails, is a web application frameworkwritten in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages.
If you have any confusion then you can ask our experts.Our experts will guide you properly.
We are looking you if you are looking guidance for web design and development. Apply online.
Contact us
In this Blog We will see Session class in CodeIgniter (CI). --------------------------------------------------------------------------- The Session class is responsible for initializing session cookies, setting session data, and returning session data when it’s called in your application. We’ll be creating the session, creating session data, and then reading session data from our session cookie. Step 1 Session Configuration ------------------------------ First we have to initialize a session cookie in autoload.php $autoload['libraries'] = array('session'); Now our session cookie is autoloaded globally across the application. Step 2 session cookies to be encrypted. ------------------------------------------- Navigate to config.php and change the following to TRUE $config['sess_encrypt_cookie'] = TRUE; < ?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class login extends CI_Controller { public function index() { $data['id'] = $this->session->userdata('session_id'); $this->load->view('data', $data); } } The View file ----------------------- <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Home</title> </head> <body> <p> Session ID: <?php echo $id ?> </p> </body> </html> Adding Session Data -------------------------------- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class login extends CI_Controller { public function index() { $sessionData = array( 'username' => 'user'); $this->session->set_userdata($sessionData); $data['id'] = $this->session->userdata('session_id'); $data['username'] = $this->session->userdata('username'); $this->load->view('data', $data); } } You can see we’re passing a username into the $sessionData array named user, then we assign our session ‘username’ to our $data array with the same ‘username’ key.Now that we’re passing the username into our view through the $data array, we need to display it in the view, so go into data.php and write the following: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Home</title> </head> <body> <p> Session ID: < ?php echo $id ?> </p> <p> Username: < ?php echo $username ?> </p> </body> </html> Now when you open your application in the browser you’ll see your session id and the username user. Note :- -------- If you want to see all the session value print_r($this->session->all_userdata()); exit();