Form checkbox using AJAX always showing ON with php

bypeClealaMarlx

New Member
I have a checkbox as such\[code\]<input name="notify" type="checkbox" id="notify" class="notify" />\[/code\]I am using an ajax call as such\[code\]$("form#submit").submit(function() {// we want to store the values from the form input box, then send via ajax belowvar 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+ "&notify="+ notify+ "&session_user_id="+ session_user_id,success: function(data){$('div.success').fadeIn();$('div.success').html(data);}});return false;});\[/code\]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?
 
Top