I have check boxes for days(monday,tuesday...) set up on a html page and i want to add them to my database. I need to add them to DaysWorked which is an array of strings. here is my code so far
var newUser = {
'username': $('#addUser fieldset input#inputUserName').val(),
'password': $('#addUser fieldset input#inputUserPassword').val(),
'email': $('#addUser fieldset input#inputUserEmail').val(),
'fname': $('#addUser fieldset input#inputUserFname').val(),
'sname': $('#addUser fieldset input#inputUserSname').val(),
'JobType': $('#addUser fieldset select#inputUserJobType').val(),
'ShiftType': $('#addUser fieldset select#inputUserShiftType').val(),
'DaysWorked': $('#addUser fieldset input#inputUserMonday').val(),
'DaysWorked': $('#addUser fieldset input#inputUserTuesday').val(),
'DaysWorked': $('#addUser fieldset input#inputUserWendsday').val(),
'DaysWorked': $('#addUser fieldset input#inputUserThursday').val(),
'DaysWorked': $('#addUser fieldset input#inputUserFriday').val(),
'DaysWorked': $('#addUser fieldset input#inputUserSaturday').val(),
'DaysWorked': $('#addUser fieldset input#inputUserSunday' ).val(),
'HoursPerWeek': $('#addUser fieldset input#inputUserHoursPerWeek').val()
}
I know all my other code works but its here that the problem is, i just dont know how to add the days into the array that is the the object newUser.