Formulated my options string using .each and sending it via .post to an external script.
clicked.closest("form").find("input,textarea").each(function(){
var input=$(this);
if(index==1){
options = "{"+input.attr("name")+":'"+input.val()+"'";
}else if(index==no_inputs){
options += ","+input.attr("name")+":'"+input.val()+"'}";
}else{
options += ","+input.attr("name")+":'"+input.val()+"'";
}
index++;
});
alert(options);
$.post('../pages/ajax/add_orders.php',options,function(data){
alert(data);
});
..problem is when my php call script is..
<?php
print_r($_POST);
?>
I simply get an empty array with no values.
The first alert shows the formulated string correctly.
But the second one returns an empty value.
Any help greatly appreciated.