#!/usr/bin/perl -w use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use vars qw($Query $Query2 $dbh $sth $Value $Data1 $Data2); my @results; my @row; use DBI; $Query = new CGI( ); $dbh = DBI->connect("DBI:mysql:exelstock") or die "Cannot connect: " . $DBI::errstr; $Data1 = $Query->param('Value4'); $Data2 = $Query->param('Value5'); $sth = $dbh->prepare("INSERT INTO walstock (sid, name, qty) VALUES (DEFAULT, $Data1, $Data2)"); $sth->execute(); print "Content-type: text/html\n\n"; print "\n"; print "
\n"; print "