diff --git a/application/controllers/Form.php b/application/controllers/Form.php index 68c9a9a..5d31769 100644 --- a/application/controllers/Form.php +++ b/application/controllers/Form.php @@ -4,7 +4,7 @@ namespace application\controllers; defined('BASEPATH') or exit('No direct script access allowed'); -// use application\models\Form_model; +use application\models\Form_model; class Form extends CI_Controller { @@ -15,6 +15,7 @@ class Form extends CI_Controller } public function submit() { + if (!$this->session->userdata('logged_in')) { // If not logged in, redirect to login page redirect('users/login'); diff --git a/application/controllers/Welcome.php b/application/controllers/Welcome.php index bf454e8..6d7090f 100644 --- a/application/controllers/Welcome.php +++ b/application/controllers/Welcome.php @@ -1,6 +1,6 @@ - × + × ` - } else if (type === 'dropdown') { + } else if (type === 'dropdown') { optionHtml = `