Этот код предназначен для обновления записи определенного идентификатора с проверкой формы, но проверка формы не работает должным образом. Я получил следующую ошибку:
Неустранимая ошибка: допустимый объем памяти 134217728 байт исчерпан (попытался выделить 65019592 байт) в D: \ xampp \ htdocs \ CodeIgniter-3.1.9 \ admin \ system \ core \ Output.php в строке 198
public function customer_updatedata($id)
{
$this->load->view("customer_updatedatatable");
$row=$this->Customer_datatable->get_by_id($id);
//print_r($row);
$this->form_validation->set_rules('fname','First name','required');
$this->form_validation->set_rules('lname','Last name','required');
$this->form_validation->set_rules('email','Email','required');
$this->form_validation->set_rules('mobile','Mobile','required');
$this->form_validation->set_rules('password','Password','required');
$this->form_validation->set_rules('gender','Gender','required');
$this->form_validation->set_rules('profession','Profession','required');
$this->form_validation->set_rules('flatno','Flat no','required');
$this->form_validation->set_rules('buildingname','Building name','required');
$this->form_validation->set_rules('street','Street','required');
$this->form_validation->set_rules('closetlandmark','Closet landmark','required');
$this->form_validation->set_rules('city','City','required');
$this->form_validation->set_rules('state','State','required');
$this->form_validation->set_rules('zipcode','Zipcode','required');
if ($this->form_validation->run())
{
$fname=$this->input->post('fname');
$lname=$this->input->post('lname');
$email=$this->input->post('email');
$mobile=$this->input->post('mobile');
$password=$this->input->post('password');
$gender=$this->input->post('gender');
$profession=$this->input->post('profession');
$flatno=$this->input->post('flatno');
$buildingname=$this->input->post('buildingname');
$street=$this->input->post('street');
$closetlandmark=$this->input->post('closetlandmark');
$city=$this->input->post('city');
$state=$this->input->post('state');
$zipcode=$this->input->post('zipcode');
$r = $this->Customer_datatable->update($id,$fname,$lname,$email,$mobile,$password,$gender,$profession,$flatno,$buildingname,$street,$closetlandmark,$city,$state,$zipcode);
$this->session->set_flashdata('success', 'Record Updated Successfully');
redirect(site_url('Admin_Controller/customer_datatable'));
}
else
{
$this->session->set_flashdata('danger','Please fill all the details');
$this->customer_updatedata($id);
//echo validation_errors();
}
}