I have a terms box on my register page, and I am sending that value to a php page where I check the value with the code;
'&terms=' + $("#terms").attr('checked')
and this is the html checkbox:
<input type="checkbox" name="terms" id="terms" data-validate="required" />
In my php, I have tried multiple things, if it's set, if the value is equal to 1 and if it's empty yet my PHP code doesn't run, here's my PHP code:
$termscheck = isset($_POST['terms']) ? '1' : '';
if (!$termscheck == 1)
{
echo '
<div class="col-md-5">
<div class="alert alert-danger">
<strong>Oh snap!</strong>Must accept terms of service
</div>
</div>';
die;
}
Even when the terms checkbox is and isn't checked that code never runs for some reason. How come?