Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Sub handling in add.pm

Quote Reply
Sub handling in add.pm
I've nearly lost it at this point...I've been trying to get Links to use a multipart form for months now with no success. I've tried following the suggestions given by Andy and Paul, (btw...thanks guys!), but I'm obviously not as well versed in Perl unfortunately. I've been hacking away at the add.pm file and I've gotten it to accept page 1 and store the values, then go on to page two...problem is, page one is viewable by scrolling down. It shows both pages at the same time!!! I've been looking through my books, but can't figure out how to stop this from happening.

Could someone please give me a hand with this....it is Christmas Unsure

Code:
sub handle {
# -------------------------------------------------------------------
# Display either an add form or process an add request.
#
if ($CFG->{user_required} and ! $USER) {
print $IN->redirect( Links::redirect_login_url ('add') );
return;
}
# We are processing an add request.
if ($IN->param('pg1')) {
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_add_link', \&add_link, {});
print $IN->header();
print Links::SiteHTML::display ('pg2');
}

if ($IN->param('pg2')) {
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_add_link', \&add_link, {});
print $IN->header();
print Links::SiteHTML::display ('pg3');
}

if ($IN->param('pg3')) {
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_add_link', \&add_link, {});
print $IN->header();
print Links::SiteHTML::display ('pg4');
}
else {
print $IN->header();
print Links::SiteHTML::display ('add_success', $results);
}
}

Perl Hopefull
Subject Author Views Date
Thread Sub handling in add.pm stilton 2141 Dec 12, 2003, 9:14 AM
Thread Re: [stilton] Sub handling in add.pm
yogi 2076 Dec 12, 2003, 9:34 AM
Thread Re: [yogi] Sub handling in add.pm
stilton 2072 Dec 12, 2003, 11:13 AM
Post Re: [stilton] Sub handling in add.pm
yogi 2074 Dec 12, 2003, 11:58 AM
Post Re: [stilton] Sub handling in add.pm
pugdog 2019 May 3, 2004, 12:43 AM