in reply to Re: Re: Creating a login page
in thread Creating a login page

perhaps you meant:

my $cgi = new CGI; print $cgi=>header(); print $cgi->start_html(-title=>'Password');

Replies are listed 'Best First'.
Re: Re: Re: Re: Creating a login page
by mnlight (Scribe) on Dec 21, 2001 at 05:56 UTC
    I made the change and now I am getting the same error only on start_html instead of header

    Can't call method "start_html" on an undefined value at Password.pl line 26

    #Volunteer.pl - Sign up sheet for Volunteers use strict; use DBI; use CGI qw(:standard); my $query = new CGI; #my $query = CGI::new; my ($dbh, $sth, $query); my @player = (); $dbh = DBI->connect ("DBI:mysql:host=localhost;database=<database>", "mnlight","<password.", {PrintError=> 0, RaiseError=> 1}); $sth = $dbh->prepare ("select Player from Roster order by Player"); $sth->execute (); while (my @row = $sth->fetchrow_array ()) { push @player, $row[0]; print $query=>header(); print $query->start_html(-title=>'Password');. print $query->start_form('POST','/cgi-bin/Password.pl'), print $query->scrolling_list( -name =>'Player', -value =>[@player], -size =>'20'); } print "<p>"; print $query->password_field(-name => 'Password', -size => 8, -override => 1,); print end_form,
      print $query=>header(); should read
      print $query->header();

      you stomped on $query and wound up with the same problem.