In my html form all data is successfully validation except checkbox value. It's not validate with jquery/ajax request.
here is my html form ajax and html code (only terms part):
<tr>
<td>Terms & Conditions</td>
<td><input type="checkbox" name="terms"/> I agree to your <a href="">terms and
conditions</a>.</td>
<script>
$('#form1').submit(function(event) {
event.preventDefault();
$.ajax({
type: 'POST',
url: 'regProcess.php',
data: $(this).serialize(),
dataType: 'json',
success: function (data) {
$('#info1').html('');
$.each( data, function( key, value ) {
$('#info1').append('<p>'+value+'</p>');
});
}
});
});
</script>
In regProcess.php page following is my Checkbox validation code but it's not validating..
if(isset($_POST['terms']) && $_POST['terms'] == ""){
$msg[] = "You must agree our terms and conditions";
$msg1['error'] = true;
}