CodeIgniter Forums

Full Version: Form validation error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
EDIT: I found out what error I had. I named input and submit button same. Beginner mistake. Sorry. Can be deleted.


I have a function which shows and validate input, but I have a problem with variables after submit ($_POST / $this->input->post() is empty !!!)

This is my function. I have all libraries used inside of this function activated

This is my function. All the time I get the required error. Has anyone an idea ?

PHP Code:
// Check if we have any request
// Set delimiters
'<div class="error_prefix"><i class="fa fa-info-circle"></i> ',

// Validate 'Event code'
'required'               => lang('event_code_required'),
'min_length'             => lang('event_code_min_length'),
'max_length'             => lang('event_code_max_length'),
'event_exists'           => lang('event_code_exists')

// Check if our form looks good
if(false !== $this->form_validation->run()){
redirect(base_url('validate/' $this->input->post('event_code')));

       // Variables
       $this->data['title'               'Mainpage :: ' $this->data['raw_title'];

       // Get current language flag
       $getCurrentLangFlag $this->language->findBy(['lang_abbr'=>$this->session->userdata('lang')])->row();

       $this->data['current_lang_flag'   '<img src="' base_url('public/images/flags/' strtolower($getCurrentLangFlag->lang_flag)) . '" />';
       $this->data['languages'           $this->language->findAllBy(['lang_abbr !='=>$this->session->userdata('lang')]);

       // Views