<?php
//var_dump($_POST);
echo "In second code\n";
echo $_POST["test"] . " " . $_POST["test2"];
?>
When run I get
building arrayarray (size=2)
'test' => string 'el1' (length=3)
'test2' => string 'el2' (length=3)
string 'In second code
el1 el2' (length=22)
So the output from the second page is returned in your $hasil variable. Not sure exactly how your array is laid out, but if you var_dump([$_POST]) in the destination code it should show you how it’s accessed.
(ETA - works without the http_build_query() function as well, so I’ve taken it out).