Versuch, einen Spaltenwert über Codesigniter-Row ()-> Name zu erhaltenPhp

PHP-Programmierer chatten hier
Anonymous
 Versuch, einen Spaltenwert über Codesigniter-Row ()-> Name zu erhalten

Post by Anonymous »

Ich begegne einen Fehler, wenn ich mein Formular einsage: < /p>

Ein Php-Fehler wurde aufgenommen. />c:\openServer\Domains\ medicalSystem.com\ Application\controllers\admin.php
Zeile: 253 Funktion: _error_handler
blockquote < /p>
< /blockquote>

Code: Select all

if ($task == "create"){

$email = $_POST['email'];
$patient = $this->db->get_where('patient', array('email' => $email))->row()->name;
if ($patient == null) {
$this->crud_model->save_patient_info();
$this->session->set_flashdata('message', get_phrase('patient_info_saved_successfuly'));
} else {
$this->session->set_flashdata('message', get_phrase('duplicate_email'));
}
redirect(base_url() . 'index.php?admin/patient');
}

Fehlerzeilencode

Code: Select all

$patient = $this->db->get_where('patient', array('email' => $email))->row()->name;
Diese Zeile hat ein Problem.

Code: Select all

function save_patient_info()
{
$data['name'] = $this->input->post('name');
$data['email'] = $this->input->post('email');
$data['password'] = sha1($this->input->post('password'));
$data['address'] = $this->input->post('address');
$data['phone'] = $this->input->post('phone');
$data['sex'] = $this->input->post('sex');
$data['birth_date'] = strtotime($this->input->post('birth_date'));
$data['age'] = $this->input->post('age');
$data['blood_group'] = $this->input->post('blood_group');
$this->db->insert('patient',$data);
$patient_id = $this->db->insert_id();
move_uploaded_file(
$_FILES["image"]["tmp_name"],
"uploads/patient_image/" . $patient_id . '.jpg'
);
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post