CodeIgniter: Getting Parameters From GET


CodeIgniter Step By Step Tutorial: If previous post we learn how to send parameter to view, now, we will learn how to get parameter from GET. As we know, we can see this parameter from Url. Example: http://localhost/index.php?name=Andi. Clear, we can get parameter name. How about in CodeIgniter?

Ok, we learn by doing. Open again your hello.php within CodeIgniter/system/application/controller. Rewrite with following code:

variabel in function in codeigniter controller

Now, try point your browser to http://localhost/CodeIgniter/index.php/hello/you/Imanda/Fa

getting variabel from GET

This is analysis:

analysis getting variabel from GET



Series this article:
CodeIgniter: Introduction to CodeIgniter Framework
CodeIgniter: Installation
CodeIgniter: Creating First Application at CodeIgniter
CodeIgniter: Creating and Sending Parameters Between Controller and View
CodeIgniter: Getting Parameters From GET
CodeIgniter: Setting Database Configuration
CodeIgniter: Preparing Database
CodeIgniter: Showing Simple All Data
CodeIgniter: Showing Simple One Data
CodeIgniter: Choosing a Data From GET

Bookmark and Share Tag: CodeIgniter, framework, MVC, parameter, controller, view, GET Category: PHP Framework Post : January 21st 2008 Read: 60,895

blog comments powered by Disqus