Test Husky pre-commit hook.

This commit is contained in:
RameshT 2024-08-05 15:49:43 +05:30
parent 9d10e9476d
commit 31bce137e3
1 changed files with 3 additions and 0 deletions

View File

@ -13,11 +13,14 @@ class Form extends CI_Controller
parent::__construct(); parent::__construct();
$this->load->model('Form_model'); $this->load->model('Form_model');
} }
public function submit() public function submit()
{ {
if (!$this->session->userdata('logged_in')) { if (!$this->session->userdata('logged_in')) {
// If not logged in, redirect to login page
redirect('users/login'); redirect('users/login');
} }
$form_data = json_decode($this->input->raw_input_stream, true); $form_data = json_decode($this->input->raw_input_stream, true);
$this->load->model('Form_model'); $this->load->model('Form_model');