Check Captcha using Callback in CodeIgniter | Code Optimization | Part -4

Опубликовано: 14 Октябрь 2024
на канале: Knowledge Thrusters
473
6

In this video, you will be able to check captcha code using a callback function in codeIgniter.

Please go through all part before watching this
   • How to add Captcha in CodeIgniter | C...  

Code
https://github.com/sushma-singh-yadav...

Firstly , store your captcha code in session.
Then, have a input field to enter captcha code.

When you submit the form, create a function for form submission.
In that load the library for form validation.
Then set the rule for captcha code - required and set a callback function (callback_your_function_name)
Then create the same function (your function name) with argument of your captcha input field
In that get the captcha code stored in session.

Check both the code if both code are same then return true else false
if false then also set the error message , that captcha is not correct or matched.

#codeigniter #knowledgethrusters #captcha