student has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use CGI qw(:standard -debug); print "Content-type: text/html\n\n"; #assign input items to variables my $action = param('action'); my $pname = param('pname'); my $unit = param('unit'); my $qty = param('qty'); my $cost = param('cost'); if ($pname eq "" or $unit eq "" or $qty eq "" or $cost eq "") { print "<html><b><h2><center>Please fill in the form completely. Use yo +ur backspace button to go back and complete the form</h2></b></center +>\n"; print "</HTML>\n"; }else { insert into products (pname, unit, qty, cost) values ('pname', 'unit', + 'qty', 'cost'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Insert function
by VSarkiss (Monsignor) on Nov 23, 2004 at 02:08 UTC | |
|
Re: Insert function
by pg (Canon) on Nov 23, 2004 at 02:35 UTC |