------------------------------------------------------------
Listing 3: edit-person-form.html

<!-- -*- mmm-classes: mason -*- -->
<HTML>

<Head>
<Title>First name editor</Title>
</Head>

<Body>
<H1>First name editor</H1>

<form method="POST" action="edit-person.html">

<P>Change the first name of

<select name="email">

# Iterate through the names and addresses, printing them out
% foreach my $info (@names_and_addresses) {
    <option value ="<% $info->[1] %>"><% $info->[0] %>
% }

</select>

to: <input type="text" name="new_first"></P>

<P><input type="submit" value="Change the first name"></P>

</Form>

</Body>

</HTML>

<%init>
use People;
my $people = new People;

# Get all of the names of people, so that we can print them
my @names_and_addresses = $people->get_names_and_addresses();
</%init>                            
