#!/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'); }
In reply to Insert function by student
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |