Scroll to top

Haloo! Selamat Datang di Komunitas Private Training Web Development (37751 Members, 324 Projects, 3184 Topic, 8882 Comments)

Butuh karyawan baru? atau seorang Web Developer (Part-time/Freelance/Full-time) untuk mengerjakan project/aplikasi anda?, cari disini : Members Area Jobs!
Membuat Fitur Lupa Password di Codeigniter
Ahmad Adzan Azari Mengatakan : Members -
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2. mas mau tanya saya mau buat fitur lupa password di sistem yang saya buat tetapi masih error. gimna ya mas solusinya?
  3.  
  4. //Controller
  5.  
  6. Klik di sini untuk mengganti kata sandi Anda.<br>
  7. Atau Anda dapat copas (Copy Paste) url dibawah ini ke address Bar Browser anda :<br>
  8. <a href='".base_url().$this->uri->segment(1)."/reset_password/$usr[nip]'>".base_url().$this->uri->segment(1)."/reset_password/$usr[nip]</a><br><br>
  9.  
  10. Tidak meminta penggantian ini?<br>
  11. Jika Anda tidak meminta kata sandi baru, segera beri tahu kami.<br>
  12. Email. $iden[email], No Telp. $iden[no_telp]</td></tr>
  13. </table>
  14. </body></html> \n";
  15.  
  16. $this->email->from($iden['email'], $iden['nama_website']);
  17. $this->email->to($usr['email']);
  18. $this->email->cc('');
  19. $this->email->bcc('');
  20.  
  21. $this->email->subject($subject);
  22. $this->email->message($message);
  23. $this->email->set_mailtype("html");
  24. $this->email->send();
  25.  
  26. $config['protocol'] = 'sendmail';
  27. $config['mailpath'] = '/usr/sbin/sendmail';
  28. $config['charset'] = 'utf-8';
  29. $config['wordwrap'] = TRUE;
  30. $config['mailtype'] = 'html';
  31. $this->email->initialize($config);
  32.  
  33. $data['title'] = 'Password terkirim ke '.$usr['email'];
  34. $this->load->view(base_url().'login',$data);
  35. }
  36. }else{
  37. $this->load->view('lupa_password');
  38. }
  39. }
  40. }
  41.  
  42. //View
  43.  
  44. <div class="main">
  45. <div class="container">
  46. <div class="row">
  47. <div class="col l6 offset-l3 s12">
  48. <div class="card">
  49. <div class="card-header">
  50. <img class="logo" src="<?php base_url() ?>asset/images/<?php echo $identitas['favicon'] ?>" style='width: 200px'>
  51. <p>Silahkan masukan E-mail anda yang terdaftar</p>
  52. </div>
  53. <form action="<?php base_url() ?>lupa_password/" method="POST">
  54. <div class="row">
  55. <div class="input-field col s11">
  56. <input id="email" type="text" class="validate" name="email">
  57. <label for="email">E-mail</label>
  58. </div>
  59. </div>
  60. <br>
  61. <div class="row">
  62. <div class="col l6 s8">
  63. <button class="btn-flat">Kembali Login ?</button>
  64. </div>
  65. <div class="col l2 offset-l3 s4">
  66. <button class="waves-effect waves-light btn light-blue darken-2" name="lupa" type="submit">Kirim</button>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75.  
  76. dan saya lampirkan juga tabel untuk akses akunnya beserta errornya
Ada 2 File Kiriman :
1. error6.PNG (16 KB)
2. table.PNG (59 KB)
Maaf, Untuk Memberikan Komentar Anda Harus Login !!!