I am supposed to submit 2 values called str and name to another page.But only 1value is getting returned in the next page. When I include name and on next page if I say print_r($_POST)
,then even the first value is not getting printed. I have written a function as follows,which works because there is only one parameter.
function sendValue(str)
{
$.post(
"newsletter/subscribe.php", //Ajax file
{
sendValue: str
},
function(data){
$('#display').html(data.returnValue);
},
"json"
);
}
But if I pass 2 values in that function and in $.post
, I do sendValue:str,name
then I am not getting even 1 value.