嗨,大家好,我只是爲了顯示錯誤消息而只是簡單地顯示了代碼,但現在仍在顯示。 - 你可以在開始做這個在codeigniter中顯示帶有錯誤消息的值頁面
首先發起的空屬性,所以你知道它的存在:
public function check_profile_ifexist($id)
{
if($this->input->post('edit')){
$this->form_validation->set_rules('email','Email','trim|valid_email|is_unique[user_details.email]');
$this->form_validation->set_rules('username','Username','trim|min_length[6]|max_length[20]|is_unique[user_details.username]|xss_clean'); $this->form_validation->set_message('is_unique',"That %s already exists!");
$this->form_validation->set_message('max_length', 'the maximum characters for %s is 20');
$this->form_validation->set_message('min_length', 'the minimum characters for %s is 6');
if ($this->form_validation->run())
{
$this->load->model('model_user_manage');
$em=$this->model_user_manage->update_all($id);
}
else
{
$this->view_profile($id);
}
}
}
你好謝赫你能幫助我嗎? – webstudent