Here is html...
<form name="stream" method="post" action="scripts/validate.php">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="attend" value="yes" autocomplete="off">
<label class="form-check-label" for="attend">Yes, I will attend the event in Edo State.</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="trad" value="yes" autocomplete="off">
<label class="form-check-label" for="trad">Yes, I'm interested in getting the Asoebi.</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="house" value="yes" autocomplete="off">
<label class="form-check-label" for="house">Yes, I am interested in getting Accommodation.</label>
</div>
<button class="btn bg-bur text-white h4 btn-block mt-20" type="submit" name="stream">Submit</button>
</form>
And here is the php to process the form data but it keeps displaying the same result, "I want the full registration" even when 1 checkbox is checked or none is checked
<?php
if( isset( $_POST['stream'] ) ) {
if ($_POST['attend'] == 'yes' && $_POST['trad'] == 'yes' && $_POST['house'] == 'yes' ) {
echo "I want the full registration";
}
elseif ($_POST['attend'] == 'yes' && $_POST['trad'] == 'yes' && $_POST['house'] !== 'yes' ) {
echo "I want the Asoebi and I will attend";
}
elseif ($_POST['attend'] == 'yes' && $_POST['trad'] !== 'yes' && $_POST['house'] !== 'yes' ) {
echo "I am only attending";
}
elseif ($_POST['attend'] !== 'yes' && $_POST['trad'] == 'yes' && $_POST['house'] !== 'yes' ) {
echo "I only want Asoebi";
}
elseif ($_POST['attend'] !== 'yes' && $_POST['trad'] !== 'yes' && $_POST['house'] !== 'yes' ) {
echo "You haven't selected anything";
}
}
?>