# Some constants to use in our form.
# recover the "preferences" cookie.
# If the user wants to change the background color or her
# name, they will appear among our CGI parameters.
foreach ('text','background','name','size') {
}
# Set some defaults
# Refresh the cookie so that it doesn't expire. This also
# makes any changes the user made permanent.
-value=>\%preferences,
print header(-cookie=>$the_cookie);
# Adjust the title to incorporate the user's name, if provided.
"Welcome back, $preferences{name}!" : "Customizable Page";
# Create the HTML page. We use several of Netscape's
# extended tags to control the background color and the
# font size. It's safe to use Netscape features here because
# cookies don't work anywhere else anyway.
print start_html(-title=>$title,
);
You can change the appearance of this page by submitting
the fill-out form below. If you return to this page any time
within 30 days, your preferences will be restored.
END
;
# Create the form
print hr(),
"Your first name: ",
TR(
),
),
TR(
)
),
TR(
)
)
),
hr;
print end_html;