Re: Info needed...

From: James Edward Gray II (james_at_grayproductions.net)
Date: 04/29/04


Date: Thu, 29 Apr 2004 09:38:16 -0500
To: "Cristi Ocolisan" <cristi@wiq.ro>

On Apr 29, 2004, at 9:36 AM, Cristi Ocolisan wrote:

> I already used hidden fields, but because I couldn't figure out how to
> write
> a single script, I wrote dozens of different small scripts and sent
> that
> hidden field from one script to another.
>
> I'm tired of that. I want to write a single script that handles several
> pages...

my $mode = $query->param('mode');

if ($mode eq 'add') { add_product(); }
elsif ($mode eq 'edit') { edit_product(); }

# ... etc.

James