If actualizaciones
is an object of type
{
id_user: 1,
id_select:2
}
When you concatenate it with actualizar.php?actualizaciones=
you are casting it to a String. That cast will always give you [object Object]
What you could do to get started (although it's not the right way in reality) is to convert your object to a string using JSON.stringify
and, on the server side, convert it back to an object (or array) using json_decode
.
function actualizarEstado(){
hi = Object.values(actualizaciones);
window.location = ('actualizar.php?actualizaciones='+ JSON.stringify(hi));
}
<?php
$actualizaciones= $_REQUEST['actualizaciones'];
print_r(json_decode($actualizaciones,true));
?>
But again, this is not the right way to do it. Depending on the values in your arrangement, you would have to sanitize what you pass to the URL where you redirect. There are a thousand things that can go wrong with this approach to the problem ... but if you're just experimenting, I guess this answer will suffice to push you in the right direction.
Only as a suggestion: It would be easier for you if you pass the content of actualizaciones
through Ajax.