I have a small function that will eventually save to a database, but um having trouble reading the post into the php, here is the jquery:
$("#loginbtn").click(function() {
var myData = new Array(
'emp='+ $("#emp").val(), //build a post data structure
'sdate='+ $("#sdate").val(),
'tdate='+ $("#tdate").val(),
'address='+ $("#address").val(),
'city='+ $("#city").val(),
'state='+ $("#state").val(),
'zip='+ $("#zip").val(),
'pos='+ $("#pos").val(),
'sal='+ $("#sal").val(),
'phone='+ $("#phone").val(),
'sname='+ $("#sname").val(),
'duties='+ $("#duties").val(),
'reason='+ $("#leave").val()
);
alert(myData)
jQuery.ajax({
type: "POST", // HTTP method POST or GET
url: "inc/functions.php", //Where to make Ajax calls
dataType:"Data", // Data type, HTML, json etc.
data:myData, //Form variables
success:function(data){
alert('back')
},
error:function (xhr, ajaxOptions, thrownError){
alert(thrownError);
}
});
});
it will display that it came back but of course the error is that the fields are null. any help appreciated. Jeff