Help for this page

Select Code to Download


  1. or download this
    $dbh = DBI->connect ("DBI:mysql:host=localhost;database=my_db",
     "my_id", "my_pass",
     {PrintError => 0, RaiseError => 1});
    
  2. or download this
    # Begin the Editing of the Guestbook File
    open (FILE,"$guestbookreal") || die "Can't Open $guestbookreal: $!\n";
    @LINES=<FILE>;
    close(FILE);
    $SIZE=@LINES;
    
  3. or download this
    # Open Link File to Output
    open (GUEST,">$guestbookreal") || die "Can't Open $guestbookreal: $!\n
    +";
    
  4. or download this
    for ($i=0;$i<=$SIZE;$i++) {
       $_=$LINES[$i];
    ...
    }
    
    close (GUEST);
    
  5. or download this
    my $content;
    open FILE, '<', $guestbookreal; # Open a filehandle FILE to $guestbook
    +real 
    ...
    $sth->execute();
    
    $dbh->disconnect;
    
  6. or download this
    # Begin the Editing of the Guestbook File
    
  7. or download this
    $dbh->disconnect;
    
  8. or download this
    # Check that the things which must have a value have values:
    if(defined $FORM{Description} and defined $FORM{Title})
    ...
    {
        print "You must enter a Description and a Title";
    }