Category: codeigniter

How to insert, update, delete in codeigniter using ajax jquery

Click here to see  Demo.

Advertisements

Send email by using codeigniter library via localhost

public function sendemail(){
  $config = Array(
  ‘protocol’ => ‘smtp’,
  ‘smtp_host’ => ‘ssl://smtp.googlemail.com’,
  ‘smtp_port’ => 465,
  ‘smtp_user’ => ‘your email@gmail.com’,
  ‘smtp_pass’ => ‘your email password’,
);
  $this->load->library(’email’, $config);
  $this->email->set_newline(“\r\n”);
  $this->email->from(‘your email@gmail.com’, ‘your Name’);
  $this->email->to(’email@yahoo.com’);
  $this->email->subject(‘ Your Subject here.. ‘);
  $this->email->message(‘Your Message here..’);
  if (!$this->email->send()) {
    show_error($this->email->print_debugger()); }
  else {
    echo ‘Your e-mail has been sent!’;
  }
}