#!/usr/bin/perl
print "Content text:html/text\n\n";
use DBI;
$user = "metalshell";
$pass = "pass";
$dab = "dbname";
$dbh = DBI->connect("DBI:mysql:$dab",$user,$pass);
$CreateTable=$dbh->prepare(
"create table mytable(ID varchar(30) NOT NULL,
Name varchar(30) NOT NULL)"
);
$CreateTable->execute();
my @info=();
print "Table Created\n\n";
$InsertValue="insert into mytable values(5,'Snap')";
$rtn=$dbh->do($InsertValue);
print "User Added\n\n";
$user="detour";
$UpDate="update mytable set Name='$user' where ID=5";
$rtn=$dbh->do($UpDate);
print "Table Updated\n\n";
$DelUser="delete from mytable where ID=5";
$rtn=$dbh->do($DelUser);
print "User Deleted";
$DropTable="drop table mytable";
$rtn=$dbh->do($DropTable);
$CreateTable->finish();
$dbh->disconnect();