DeletePage
  Home FAQ Contact Sign in
perl.beginners.cgi only
 
Advanced search
POPULAR GROUPS

more...

perl.beginners.cgi Profile…
 Up
DeletePage         


Author: Deepan - M.Sc - 03MW06
Date: Mar 17, 2008 22:16

Hi all,
I am having a submit button and upon clicking it i am
asking the user for confimation [for this i have used javascript].
When the user selects yes i should be able to call another subroutine.
But i am going wrong somewhere. Here's the code for your reference.
Please help me to solve this. Thanks!

#!/usr/bin/perl -w

use strict;
use CGI;

&main();
exit(0);

sub main {
my $cmd = CGI::param('cmd');

&mainPage() if($cmd eq "");
&deletePage() if($cmd eq "true");

}

sub mainPage {
Show full article (1.47Kb)
1 Comment
Re: DeletePage         


Author: Gunnar Hjalmarsson
Date: Mar 18, 2008 12:24

Deepan - M.Sc(SE) - 03MW06 wrote:
> I am having a submit button and upon clicking it i am
> asking the user for confimation [for this i have used javascript].
> When the user selects yes i should be able to call another subroutine.
> But i am going wrong somewhere.


> print < >

>

Maybe you meant that to be


> sub deletePage {
>

You need a content-type header here.

print CGI::header();
> print "File was deleted successfully!
";
>
> }
Show full article (0.70Kb)
no comments