Untuk membuat PHP set cookie login ada beragam cara dan pendekatan yang bisa dpilih. Dalam kasus ini kita akan mencobanya dengan pendekatan password_verify() yaitu metode yang menggunakan enkripsi kata sandi sebagai bahan validasi. Kodenya bisa kamu lihat dalam lampiran ya.
Pembahasan:
Pada dasarnya penggunaan cookie untuk keperluan login sangat tidak disarankan. Alasannya antara lain dikarenakan cookie dapat dengan mudah diretas. Alih-alih menggunakan metode cookie saya lebih menyarankan kamu untuk memakai sesi (session) yang pada prakteknya lebih aman karena disimpan dalam server.
Jadi set kode yang akan kamu gunakan ini sebaiknya dipakai hanya untuk pembelajaran saja, jangan digunakan dipraktekan dalam project yang nyata ya.
Verified answer
Untuk membuat PHP set cookie login ada beragam cara dan pendekatan yang bisa dpilih. Dalam kasus ini kita akan mencobanya dengan pendekatan password_verify() yaitu metode yang menggunakan enkripsi kata sandi sebagai bahan validasi. Kodenya bisa kamu lihat dalam lampiran ya.
Pembahasan:
Pada dasarnya penggunaan cookie untuk keperluan login sangat tidak disarankan. Alasannya antara lain dikarenakan cookie dapat dengan mudah diretas. Alih-alih menggunakan metode cookie saya lebih menyarankan kamu untuk memakai sesi (session) yang pada prakteknya lebih aman karena disimpan dalam server.
Jadi set kode yang akan kamu gunakan ini sebaiknya dipakai hanya untuk pembelajaran saja, jangan digunakan dipraktekan dalam project yang nyata ya.
Langkahnya:
Selamat mencoba!
Pelajari lebih lanjut:
1. perbedaan php mysql dengan php mysqli brainly.co.id/tugas/8392091
2. apa yang dimaksud dengan php? brainly.co.id/tugas/6353405
Detil jawaban:
Kelas: 7
Mapel: TIK
Bab: Bab 8 - Perangkat Lunak Komputer
Kode: 7.11.8
Kata kunci: php, login, cookies