Help for this page

Select Code to Download


  1. or download this
    my $sth_ins = $dbh->prepare("INSERT INTO users (firstname, lastname, s
    +tate, country) VALUES (?, ?, ? ,?)") or die "Couldn't insert the data
    +";
    $sth_ins->execute($FORM{firstname}, $FORM{lastname}, $FORM{state}, $FO
    +RM{country});
    
  2. or download this
    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
    @pairs = split(/&/, $buffer);
    ...
        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
        $FORM{$name} = $value;
    }