#!/usr/bin/perl -wT use strict; use CGI; use warnings; use 5.010; use utf8; use DBI; use Data::Dumper; # use LWP::Simple; #header my $query = CGI->new(); warn Dumper($query); print $query->header( "text/html" ), $query->start_html(-title => "Inserisci prodotti", -bgcolor => "#ddffdd" ); #definition of variables my $db="prova"; my $host="localhost"; my $user="I-inserted-here-the-user-name"; my $password="I-inserted-here-the-user-pass"; #connect to MySQL database my $dbh = DBI->connect ("DBI:mysql:database=$db:host=$host", $user, $password) or die "Can't connect to database: $DBI::errstr\n"; print <<'HERE'; Prova input

Inserisci questo prodotto nel database dei negozi:





HERE print $query->end_html(); $dbh->disconnect( ); exit;