HTTP's GET does not send hidden fields to the server automatically, so you have two options...
1. add it a query param
2. use POST
Your second problem is here:
<div id="result"></div>
<form method = "POST" action = "" name="cust_form">
<p>Type anything in the box</p>
<input type="text" name="customer" size="10" value="<?php print $customer;?>">
<p><input type="submit" value="Continue"></p>
</form>
The 'result' you are using not a hidden field (means an input with type hidden), but a div, and it is also outside of the form...
You should use markup lie this:
<div id="result"></div>
<form method = "POST" action = "" name="cust_form">
<p>Type anything in the box</p>
<input type="text" name="customer" size="10" value="<?php print $customer;?>">
<p><input type="submit" value="Continue"></p>
<input type="hidden" id="result">
</form>
-- EDIT --
A proposed solution:
sample.php
<?php
$php_result = $_POST['result'] ? $_POST['result'] : 'server';
$customer = $_POST['customer'];
echo "From server =" . $php_result;
echo "From client = " . $customer;
?>
<!DOCTYPE html>
<html>
<body onload="initStorage()">
<form method="POST" action="sample.php" onsubmit="saveStorage()">
<p>Type anything in the box</p>
<input type="text" name="customer" size="10" value="<?php echo $customer;?>">
<input type="hidden" name="result" value="<?php echo $php_result;?>">
<input type="submit" value="Continue">
</form>
</body>
<javascript>
function initStorage()
{
// store 'result' on local storage
}
function saveStorage()
{
// save local storage to 'result'
return(true); // to continue...
}
</javascript>
</html>