Page 287 -
P. 287
web development
Test Drive
Make the small edit to your code to remove the brackets from the call to the top3() method, press
your web browser’s Back button, and press the Select button one last time.
Whoo hoo! This
time the selected
athlete’s data is
displayed on screen.
Nice, eh?
Now that you’ve
solved that
problem, be sure
to switch off
CGI tracking.
Q: What happens if the coach recruits new athletes? Q: Shouldn’t the server’s data be in a database as opposed
to a pickle? Surely that would be better, right?
A: All Coach Kelly needs do is create a new text file similar to the
others, and your webapp handles the rest by dynamically including A: In this case, it’s probably overkill to use a database, but it might
the new athlete the next time your webapp runs, which occurs when be worth considering sometime in the future.
someone clicks on the home page’s “timing data” hyperlink.
you are here 4 251