getMessage()) and die(); } // //--------------- // // Query and sending results // //--------------- header('Content-Type: application/json'); $encodedData=file_get_contents('php://input'); $decodedData=json_decode($encodedData, true); $addName=$decodedData["name"]; $addEmail=$decodedData["email"]; $addPhone=$decodedData["phone"]; $queryAddUser = "INSERT INTO users (name, email, phone_num) VALUES ('$addName', '$addEmail', '$addPhone')"; mysqli_query($connection, $queryAddUser); // $stmtAdd = mysqli_prepare($connection, $queryAddUser); // mysqli_stmt_execute($stmtAdd); ?>