I have a checkbox as such
<input name="notify" type="checkbox" id="notify" class="notify" />
I am using an ajax call as such
$("form#submit").submit(function() {
// we want to store the values from the form input box, then send via ajax below
var username = $('#username').attr('value');
var email = $('#email').attr('value');
var password = $('#password').attr('value');
var cpassword = $('#cpassword').attr('value');
var notify = $('#notify').attr('value');
var session_user_id = $('#session_user_id').attr('value');
$.ajax({
type: "POST",
url: "../../includes/editprofile.php?",
data: "username="+ username+
"&email="+ email+
"&password="+ password+
"&cpassword="+ cpassword+
"¬ify="+ notify+
"&session_user_id="+ session_user_id,
success: function(data){
$('div.success').fadeIn();
$('div.success').html(data);
}
});
return false;
});
In my editprofile.php file I am simply echo'n $notify to see what the value is after I submit the form and no matter what its always "on" whether I check the box or not. Any clues?