Welcome Guest, Not a member yet? Register   Sign In
Poll: Would you consider upgrading to PHP 8.0?
You do not have permission to vote in this poll.
Yes
91.89%
34 91.89%
No
8.11%
3 8.11%
Total 37 vote(s) 100%
* You voted for this item. [Show Results]

Surprised to see codeigniter 3.x running successfull with PHP 8.0 as well.
#14

hello, I have problem  with php 8.2 and ci3
so I don' t know where is the problem, but the success page doesn't show
these are my code:
Code:
        $this->form_validation->set_error_delimiters('<div class="alert alert-error">', '</div>');
        if (!$this->form_validation->run() ===TRUE)
        {
            $this->load->view('visiter_form');
        }
        else
        {
            $this->load->model('Visiteurs');
            $visiteurs = new Visiteurs();
            $visiteurs->visitors_nom = $this->input->post('visitors_nom');
            $visiteurs->visitors_cin = $this->input->post('visitors_cin');
            $visiteurs->visitors_porte = $this->input->post('visitors_porte');
            $visiteurs->visitors_badge = $this->input->post('visitors_badge');
            $visiteurs->date_visit = $this->input->post('date_visit');
            $visiteurs->save();
            $this->load->view('visiter_form_success', array(
                'visiteurs'=> $visiteurs,
            ));
        }
        $this->load->view('bootstrap/footer');
    }
   
    public function date_validation($input)
    {
        $test_date = explode('-', $input??'');
        if (!@checkdate($test_date[1], $test_date[2], (int) $test_date[0]))
        {
            $this->form_validation->set_message('date_validation', 'The field must be in jj/mm/aaaa format.');
            return FALSE;
        }
        return TRUE;
    }
Reply


Messages In This Thread
RE: Surprised to see codeigniter 3.x running successfull with PHP 8.0 as well. - by joya - 06-06-2023, 12:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB