What is the best practice for accessing GET/POST parameters in a PHP framework like CodeIgniter?

When working with a PHP framework like CodeIgniter, the best practice for accessing GET/POST parameters is to use the framework's built-in input class. This class provides convenient methods for securely retrieving data from both GET and POST requests. By using this input class, you can ensure that your application is protected against common security vulnerabilities such as SQL injection.

// Accessing GET parameter in CodeIgniter
$param_value = $this->input->get('param_name');

// Accessing POST parameter in CodeIgniter
$param_value = $this->input->post('param_name');