Posted by Toby Inkster on 11/21/59 11:58
carlg wrote:
> How would I write a simple web app in Perl+cgi that has state? Let's
> say I just want to have a web page that has an input field, an Accept
> button and a Clear button. Whenever I type some text into the field
> and click on Accept it concatenates the text in the field with an
> existing string and displays it on the web page. So I can submit a few
> words one at a time and make a sentence. Clicking the Clear button
> lets me start over.
Method 1: use cookies.
Method 2: use hidden input fields to pass around data.
Preferred method: if (test for cookies) { method 1; } else { method 2; }
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|