I am using the following to get js variables to a php file. The alert seems to be given the correct data.
var str = $("form").serialize();
alert('test '+str);
//console.log('test '+str);
$.ajax({
type:"POST",
url: "saveData.php",
data: str,
and i the php file i tried
echo 'Test name: '.$_REQUEST["name"];//only got the test name
also
print_r($_REQUEST);
and even tried
$values = array();
parse_str($_REQUEST['str'], $values);
print_r($values);
But without succes, any tips or info?
str?