Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: A CGI redirect problem

by CharlesClarkson (Curate)
on Jan 29, 2002 at 00:44 UTC ( [id://142183]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( param ) {
    } else {
    }
    sub start_handler {}
    sub char_handler  {}
    
  2. or download this
    sub start_handler {
          my ($expat, $element, %attributes) =@_;
    ...
             $::flag=2;
          }
    }
    
  3. or download this
    sub start_handler {
        my $element = $_[1];
        $::flag = 1 if $::flag == 0 && $element eq 'username';
        $::flag = 2 if $::flag == 1 && $element eq 'password';
    }
    
  4. or download this
    sub char_handler {
        my ($expat, $text) =@_;
    ...
           #print a link back to login.pl
        }
    }
    
  5. or download this
        return unless $::flag;
    
  6. or download this
        warn '$::flag must be 0, 1, or 2 only' if $::flag > 2 or $::flag <
    + 0;
    
  7. or download this
        my $text = $_[1];
    
  8. or download this
        if ($::flag==1 && $text eq (param("username"))) {
           $::flag=1;
        }
    
  9. or download this
        if       ( $::flag==2 && $text eq param('password') ) {
        } elsif  ( $::flag==2 && $text ne param('password') {
        }
    
  10. or download this
        if ( $::flag==2 ) {
            if ( $text eq param('password') ) {
            } else {
            }
        }
    
  11. or download this
        return unless $::flag == 2;
        if ( $text eq param('password') ) {
        } else {
        }
    
  12. or download this
        if ( $text eq param('password') ) {
            print redirect( 'http://www.domain.com/cgi-bin/xml_final/viewd
    +b.pl?username=' . param('username') );
    ...
                end_html;
        }
        exit;   # no reason to continue processing if the browser is movin
    +g on
    
  13. or download this
    sub char_handler {
        return unless $::flag;
    ...
        }
        exit;
    }
    
  14. or download this
       my ($parser, $document, $users);
       local($::flag);
    ...
    
       $document = $parser->parse (\*USERS);
       close (USERS);
    
  15. or download this
    $::flag = 0;
    open USERS, '../../xml_final/users/users.xml' or die "Could not open u
    +sers.xml: $!";
    ...
    
        my $document = $parser->parse(\*USERS);
    close USERS;
    
  16. or download this
    unless ( param ) {
        print login_form();
    ...
                    a({ -href => 'newuser.pl'}, 'New User?') ),
            end_html;
    }
    
  17. or download this
    #!/usr/bin/perl
    
    ...
        }
        exit;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://142183]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found