APLIKASI PENGOLAHAN DATA NILAI SISWA BERBASIS WEB MENGGUNAKAN CODEIGNITER - E-RAPOERT
Table of Contents
Introduction
This tutorial will guide you through the process of creating a web-based student grade processing application using CodeIgniter, referred to as E-RAPOERT. This application will help in managing student grades efficiently, making it a valuable tool for educators and school administrators.
Step 1: Setting Up Your Development Environment
-
Install XAMPP
- Download XAMPP from the Apache Friends website.
- Follow the installation instructions specific to your operating system.
-
Download CodeIgniter
- Visit the CodeIgniter website and download the latest version.
- Extract the downloaded files to the
htdocsdirectory in your XAMPP installation folder.
-
Create a Database
- Open phpMyAdmin by navigating to
http://localhost/phpmyadmin. - Create a new database for your application (e.g.,
e_rapoert).
- Open phpMyAdmin by navigating to
Step 2: Configuring CodeIgniter
-
Set Up Database Configuration
- Navigate to the
application/configdirectory in your CodeIgniter installation. - Open the
database.phpfile and configure the database settings:$db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'e_rapoert', 'dbdriver' => 'mysqli', ... );
- Navigate to the
-
Base URL Configuration
- Open the
config.phpfile in the sameapplication/configdirectory. - Set the base URL:
$config['base_url'] = 'http://localhost/your_project_folder/';
- Open the
Step 3: Creating Models, Views, and Controllers
-
Create a Model for Student Data
- In
application/models, create a file namedStudent_model.php. - Define functions to interact with the database, such as adding, updating, and retrieving student grades.
class Student_model extends CI_Model { public function get_all_students() { return $this->db->get('students')->result(); } ... }
- In
-
Create a Controller
- In
application/controllers, create a file namedStudent.php. - Load the model and define methods for each action (e.g., index, create, edit).
class Student extends CI_Controller { public function index() { $this->load->model('Student_model'); $data['students'] = $this->Student_model->get_all_students(); $this->load->view('students/index', $data); } ... }
- In
-
Create Views
- In
application/views, create a directory namedstudents. - Create index.php, create.php, and edit.php files for the respective views.
- Use HTML and embedded PHP to display student data and forms for input.
- In
Step 4: Implementing Functionality
-
Create Forms for Data Entry
- Use HTML forms in your views to allow teachers to input and update student grades.
- Ensure form submission is handled in your controller.
-
Add Validation
- Utilize CodeIgniter's form validation library to enforce rules on the data submitted.
-
Display Student Grades
- In your index view, loop through the data passed from the controller and display it in a table format.
Conclusion
You have now set up a basic web application for processing student grades using CodeIgniter. Key steps included setting up your development environment, configuring CodeIgniter, and creating models, views, and controllers.
Next steps could include enhancing the application with user authentication, generating reports, or improving the user interface with CSS frameworks. Consider exploring additional CodeIgniter features to expand your application’s capabilities.