Help for this page

Select Code to Download


  1. or download this
    require "Sessions/mysql_session_handler.php";  // more on this later
    
  2. or download this
    session_start();
    
  3. or download this
    $session = array();
    session_register("session");
    
  4. or download this
    use CGI;
    use Apache::Session::MySQL;
    
  5. or download this
    my $q = new CGI;
    my $sess_id = $q->cookie(-name=>'sess_id');
    
  6. or download this
    tie my %session, "Apache::Session::MySQL", $sess_id, {
        DataSource    =>    'dbi:mysql:sessions',
    ...
        LockUserName    =>    'root',
        LockPassword    =>    ''
    };
    
  7. or download this
    my $cookie = $q->cookie(-name=>'sess_id',-value=>$session{'_session_id
    +'});
    print $q->header(-cookie=>$cookie);
    
  8. or download this
    tied(%session)->delete;
    
  9. or download this
    $session['_session_id'] = session_id();
    
  10. or download this
    <?
    
    ...
            'mysql_session_gc' );
    
    ?>
    
  11. or download this
    #!/usr/bin/perl -w
    
    ...
    
    $sel->finish;
    $db->disconnect;
    
  12. or download this
    #!/usr/bin/perl -w
    
    ...
    $db->disconnect;
    
    print "1";
    
  13. or download this
    <?
        
    ...
        
    ?>
    
  14. or download this
    !/usr/bin/perl -w
    
    ...
            print "What is your username? <INPUT TYPE=TEXT NAME=\"username
    +\">";
            print "<INPUT TYPE=SUBMIT></FORM>";
    }