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.
DB Class insert_id() method is used to get last insert id in codeIgnitor.
In this Blog, we will learn that how can we load a model in codeigniter and how we can use method of model using controller.
In CodeIgniter Session class allows you maintain a user’s “state” and track their activity while they are browsing your website.
In order to use session, you need to load Session class in your controller.