I have here my codes the should change the status of the specific crew once I click the submit button. but when I click the button, it gives me an FALSE result. can someone tell me what the problem is?
below is my code:
if(isset($_POST['submit'])) {
$crew = 'NEW';
$query_update = "UPDATE `crew_info` SET `crew_status` = ? WHERE `id` = ?";
$stmt2 = mysqli_prepare($conn, $query_update);
mysqli_stmt_bind_param($stmt2, 'ss', $_GET['id'],$crew);
mysqli_stmt_execute($stmt2);
if (mysqli_stmt_affected_rows($stmt2) !== 0) {
echo "Crew update accepted";
} else {
echo 'Error';
}
}