I really need help from you guys to fix my php task
Notice: Undefined index: username in C:\xampp\htdocs\wishal_login\register.php on line 6
Notice: Undefined index: password in C:\xampp\htdocs\wishal_login\register.php on line 7 {"success":0,"message":"Kolom username tidak boleh kosong"}
this is the code I made from register.php include_once "koneksi.php";
class usr{}
$username = $_POST["username"];
$password = $_POST["password"];
$confirm_password = $_POST;
if ((empty($username))) {
$response = new usr();
$response->success = 0;
$response->message = "Kolom username tidak boleh kosong";
die(json_encode($response));
} else if ((empty($password))) {
$response = new usr();
$response->success = 0;
$response->message = "Kolom password tidak boleh kosong";
die(json_encode($response));
} else if ((empty($confirm_password)) || $password != $confirm_password) {
$response = new usr();
$response->success = 0;
Please Help..