Posts

Showing posts from October, 2018

PHP MySql CRUD Dengan Konsep MVC

Image
Pada postingan kali ini saya akan sharing cara membuat CRUD dengan php menggunakan konsep MVC, ok langsung saja buka code editor (saya menggunakan sublime text) dan buat folder baru dengan nama phpmvc didalam folder htdocs kalian dan tambah folder seperti berikut :  Setelah itu kita siapkan database di mysql, buat database dengan nama phpmvc dan tablenya seperti gambar berikut : tambahkan file config.php didalam folder app/config : <?php define('BASEURL', 'http://localhost:8181/phpmvc/public'); define('DB_HOST', 'localhost'); define('DB_USER', 'root'); define('DB_PASS', ''); define('DB_NAME', 'phpmvc'); kemudian tambahkan 3 file controller didalam folder app/controllers, yaitu Home, About, dan Mahasiswa : Home.php <?php class Home extends Controller { public function index() { $data['nama'] = $this->model('User_model')->getUser()

SAP - ABAP : Dynamic ALV Cell Style

report  zalv_edit . class  lcl_report  definition . *    public  section . * *   Final output table      types :  begin  of  ty_vbak ,              vbeln       type  vbak - vbeln ,              erdat       type  erdat ,              auart       type  auart ,              kunnr       type  kunnr ,              i_celltype  type  salv_t_int4_column ,             end    of  ty_vbak .      data :  t_vbak  type  standard  table  of  ty_vbak . *   ALV reference      data :  o_alv  type  ref  to  cl_salv_table .      methods :       get_data ,            "  data selection       generate_output .     "  Generating output *    private  section .      methods :       set_columns .         "  Set columns endclass .                     "lcl_report DEFINITION * * start-of-selection .    data :  lo_report  type  ref  to  lcl_report . *    create  object lo_report .   lo_report -> get_data (  ) .   lo_report -> generate_output (  ) . * c

Mengirim Email Dengan PHP

Image
pada postingan kali ini saya akan sharing cara mengirim email dengan PHPMailer di php, sebelumnya download dulu PHPMailer  DISINI , setelah itu masuk folder htdoc di xampp, kemudian buat folder baru dengan nama email, dan tambahkan 2 buah file yaitu index.php dan sendEmail.php disini kita akan menggunakan account email gmail, pastikan sobat sudah account email gmail dan setting gmail kalian  DISINI  aktifkan jadi ON agar diberikan akses mengirim email oleh google :D untuk index.php seperti berikut : <!DOCTYPE html> <html> <head> <title>Kirim Email - PHP</title> </head> <body> <h1>Kirim Email - PHP</h1> <div> <form action="sendEmail.php" method="POST"> <table> <tr> <td>To</td><td>:</td> <td><input type="text" name="toEmail"> </td> </tr> <tr>