Test Husky pre-commit hook.
This commit is contained in:
parent
589dbc74ab
commit
c90f3bbab1
|
@ -11,18 +11,22 @@ class Form extends CI_Controller
|
|||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('Form_model')
|
||||
$this->load->model('Form_model');
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (!$this->session->userdata('logged_in')) {
|
||||
// If not logged in, redirect to login page
|
||||
redirect('users/login');
|
||||
}
|
||||
|
||||
$form_data = json_decode($this->input->raw_input_stream, true);
|
||||
$this->load->model('Form_model');
|
||||
|
||||
|
||||
|
||||
if ($this->Form_model->save_form($form_data)) {
|
||||
$response = array('status' => 'success', 'message' => 'Form submitted successfully.');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue