1/17
Looks like no tags are added yet.
CRUD
Is the foundation of most web applications.
Create → Add new records
Read → Retrieve and display data
Update → Modify existing data
Delete → Remove data from storage
CRUD stands for:
Model-View-Controller (MVC)
CodeIgniter uses the ________________ pattern:
Model
Handles database interaction
View
Displays information to the user
Controller
Manages requests and responses
Models
Manage CRUD interaction with the database.
Controller
Connects user actions to the model and views.
Displaying Data (READ)
Create a view to display the data using from our Model.
php spark serve
How to run codeigniter?
Inserting Data
Create a form (view) to accept new user in our database.
Edit and Update
Create a form (view) to select a record to update.
Delete Record
Update the controller to remove a record from the database.
Search a Record
Create a form to search records from the database
app/config/Database.php
hostname = 'localhost'
username = 'root'
password = ''
database = 'crud_db'
Make sure to replace the hostname, username, password, and database fields with the correct values based on your environment.
app/Views/user_edit.php
Create edit view
app/Config/Routes.php
Add route for Edit and Update
app/Views/user_create.php
Create view