How to do form validation in codeigniter

How to do form validation in codeigniter

Today we are going to learn more about how to create server-side form validation using CodeIgniter framework.

Whenever creating Codeigniter validation at that time load “form_validation” and “session” library and also load helpers such as form, URL, and HTML.

if the user fills all form data then click on button and form_validation is true then data will be inserted into database otherwise given the error message.

See below code.

Create controller and put below method

Create view file of add.php

Please follow and like us:

One thought on “How to do form validation in codeigniter

Leave a Reply

Your email address will not be published. Required fields are marked *