Skip to content
Advertisement

Form validation not working with form GET method

I’m trying to post my form by method="GET" instead of POST.

Codeigniter’s form_validation->run() doesn’t work.

It’s not returning any form_error in view page.

Advertisement

Answer

If you have to use $_GET, you could set the validation data before the validation rules :

$this->form_validation->set_data($_GET);

See : Validating an Array (other than $_POST)

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement