342
Chapter 6
The problem with Boards ‘R’ Us
The Boards ‘R’ Us report still uses an asynchronous request to talk to the
server, and since you solved their caching problems, the report works for
everyone in the company (including Katie’s man running Windows).
But the server needs to send back three sales numbers now: the total
number of boards sold, as well as the number of boots and bindings sold.
<script>
var request...
function foo()
{
...
}
</script>
Request
Updated Sales
Totals
PHP script
<?php
require(‘lib.php’);
function go() {
$myVar = ...
return ...
}
?>
This is the same request
as in the version of the
report that only dealt
with snowboards.
In this new version, the server has to
send back three numbers: the sales
totals for boards, boots, and bindings.
PHP script
<?php
require(‘lib.php’);
function go() {
$myVar = ...
return ...
}
?>
?
?
?
How can Katie’s PHP script
send back three different
numbers at the same time?
problems at boards ‘r’ us