CodeIgniter: Showing Simple One Data
CodeIgniter Step By Step Tutorial: After show all data, We learn how to show one data. We want a data with certain ID, example ID = 1. We still use same files with previous practice.
For model: Open "employee_model.php" within CodeIgniter\system\application\models. Add following function:

For Controller: Open "employee.php" within CodeIgniter\system\application\controllers. Add following function:

For View: Open "employee_view.php" within CodeIgniter\system\application\views. Enter following code:

Now, test it. Point your browser to http://localhost/CodeIgniter/index.php/employee/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 Tag: CodeIgniter, framework, mvc, database Category: PHP Framework Post : January 26th 2008 Read: 6,802 blog comments powered by Disqus |
