Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="obratka" id="feedback-form">
- Как к Вам обращаться:
- <input type="text" name="nameFF" required placeholder="фамилия имя отчество" x-autocompletetype="name">
- Email для связи:
- <input type="email" name="contactFF" required placeholder="адрес электронной почты" x-autocompletetype="email">
- Ваше сообщение:
- <textarea name="messageFF" required rows="5" placeholder="Здравствуйте,"></textarea>
- <input type="submit" name="obratka" value="Отправить">
- </form>
- function obratka()
- {
- $this->load->library('form_validation');
- $data['pages'] = $this->pages_model->get_pages();
- $data['pages_dop'] = $this->pages_model->get_pages_dop();
- $data['pages_dop2'] = $this->pages_model->get_pages_dop2();
- $data['pages_info'] = $this->pages_model->get_pages_info($title);
- $data['categories'] = $this->pages_model->get_cat();
- $data['latest_articles'] = $this->pages_model->get_latest_articles();
- $data['user'] = $this->session->userdata('user');
- $data['user_info']['status'] = $this->session->userdata('status');
- $data['user_info']['avatar'] = $this->session->userdata('avatar');
- $data['error'] = '';
- if($this->input->post('obratka'))
- {
- $this->load->model('rules_model');
- $this->form_validation->set_rules($this->rules_model->obratka);
- $check = $this->form_validation->run();
- if($check == TRUE)
- {
- $name2 = $this->input->post('nameFF');
- $email2 = $this->input->post('contactFF');
- $text2 = $this->input->post('messageFF');
- $this->load->library('email');
- $this->email->from($email2, $name2);
- $this->email->to('моё_мыло@mail.ru');
- $this->email->subject('Тестовое сообщение');
- $this->email->message($text2);
- $this->email->send();
- $data['error'] = "Ваш вопрос успешно оптравлен владельцу сайта. Спасибо за проявленный интерес. Я отвечу Вам в течении одного рабочего дня!";
- $name = 'info';
- $this->template->page_view($data,$name);
- }
- }
- else
- {
- $data['error'] = "вы все ....";
- $name = 'obr';
- $this->template->page_view($data,$name);
- }
- }
- Your message has been successfully sent using the following protocol: mail
- From: "llllllll" <llll@mail.ru>
- Return-Path: <llll@mail.ru>
- Reply-To: "llll@mail.ru" <llll@mail.ru>
- X-Sender: llll@mail.ru
- X-Mailer: CodeIgniter
- X-Priority: 3 (Normal)
- Message-ID: <545a735840d40@mail.ru>
- Mime-Version: 1.0
- Content-Type: text/plain; charset=utf-8
- Content-Transfer-Encoding: 8bit
- =?utf-8?Q?=d0=a2=d0=b5=d1=81=d1=82=d0=be=d0=b2=d0=be=d0=b5_=d1=81=d0=be?=
- =?utf-8?Q?=d0=be=d0=b1=d1=89=d0=b5=d0=bd=d0=b8=d0=b5?=
- llllllllll
- if($this->input->post('obratka'))
- action="obratka"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement