Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function buat_ebook(){
- $this->load->view("app_user/global/header");
- $this->form_validation->set_rules('judul_ebook', 'judul_ebook', 'trim|required');
- $this->form_validation->set_rules('cover_ebook', 'cover_ebook', 'trim|required');
- $this->form_validation->set_rules('isi_ebook', 'isi_ebook', 'trim|required');
- $this->form_validation->set_rules('kat_ebook', 'kat_ebook', 'trim|required');
- if($this->form_validation->run() == FALSE)
- {
- $this->load->view("app_user/halaman/buat_ebook");
- }
- else
- {
- if($query = $this->app_model->buat_ebook())
- {
- $this->session->set_flashdata('success', 'Your ebook successfully created!');
- header('location:'.base_url().'app_user/buat_ebook');
- }
- else
- {
- $this->session->set_flashdata('msg', 'Error insert database');
- header('location:'.base_url().'app_user/buat_ebook');
- }
- }
- $this->load->view("app_user/global/footer");
- }
Advertisement
Add Comment
Please, Sign In to add comment