How do I send jquery array to to php page .It to silly to ask this but I am new to jquery and php page and receive it on the other end.
function SendValuesToPage()
{
var leftData = JSON.Stringify(addedLeftValues);
var rightData = JSON.Stringify(addedRightValues);
// ajax code
}
And I tried it something like this
function SendValuesToPage()
{
var leftData = JSON.Stringify(addedLeftValues);
var rightData = JSON.Stringify(addedRightValues);
$.ajax({
url: "test/collect.php",
type: "GET",
data: {
'leftData[]': leftData,
'rigthData[]': rigthData
}
});
}
I am using php codeigniter (MVC architecture)