in reply to Re: Error Message
in thread Error Message
Here I placed the "ind.cgi" coding and my home page "index.html" calling this cgi when user click the submit button.
#!C:\perl\bin\perl use strict; use CGI qw/:standard/; use DBI; my $q = new CGI; my $dbh = DBI->connect("DBI:mysql:project", {PrintError =>0, RaiseErro +r =>0}) ; my $us=$q->param('user'); my $pas=$q->param('pass'); my $sth = $dbh->prepare("SELECT * FROM user WHERE uname=? AND pass=PAS +SWORD(?)"); $sth->execute($us,$pas); my ($valid_user, $pp) = $sth->fetchrow_array(); if ($valid_user eq '') { print redirect('http://localhost/index.html'); } print $q->header("text/html"), $q->start_html(-title=>uc($q->param('REG')), -Background=>'EiffelTower +.tif'); print "<br><br><H1 align='center'><b><font face='Euclid fraktur' color +='cyan'>P</font><font face='Euclid fraktur' color='megantha'>E</font> +<font face='Euclid fraktur' color='yellow'>R</font><font face='Euclid + fraktur' color='pink'>L</font> <font face='Euclid fraktur' color='Re +d'>M</font><font face='Euclid fraktur' color='Green'>O</font><font fa +ce='Euclid fraktur' color='blue'>D</font><font face='Euclid fraktur' +color='cyan'>U</font><font face='Euclid fraktur' color='megantha'>L</ +font><font face='Euclid fraktur' color='yellow'>E</font><font face='E +uclid fraktur' color='orange'>S</font></H1>"; $dbh->disconnect; print $q->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Error Message
by davidrw (Prior) on Jul 04, 2005 at 19:12 UTC | |
by Samy_rio (Vicar) on Jul 05, 2005 at 04:49 UTC |