where you want to remove data stored in session after some specific time-period, this can be done using tempdata functionality in CodeIgniter. Add Tempdata To add data as tempdata, we have to use mark_as_tempdata() function. This function takes two argument items or items to be stored as tempdata and the expiration time for those items are as shown below. Retrieve Tempdata We can retrieve the tempdata using tempdata() function. This
we need to store some data for one time and after that we want to remove that. we can achieve this type of functionality using Flashdata in CodeIgniter. Flashdata will only be available until the next request, and it will get deleted automatically. Add Flashdata We can simply store flashdata as shown below. mark_as_flash() function takes only one argument of the value to be stored. We can also pass an
In this blog, we will learn that how can we remove index.php from url in codeigniter. follow below instructions for removing index.php from url in codeigniter. .htaccess file in root directory .htaccess file in application folder In application/config/config.php search for and replace it with Now we will get URLs without index.php
Adding email functionality to CodeIgniter applications deployed on any Web Hosting for PHP is a simple matter of using the email library. All you have to do is to set a few variables and the email is setup.
Basically, all config variables are located at “application/config/config.php”. Below is the way for set or get config variable. For example,
Codeigniter posts url are dynamic generated from database data, so it can’t define static route in the url. For that all dynamic routes define in route.php eith (:any) for any string in url.