#!/usr/bin/perl use warnings; use strict; use CGI; use DBI; my $obj = new CGI; my $dbh = DBI->connect ( "DBI:Pg:dbname=test1", "postgres", "sonderbar" ) or die "Keine Verbindung mit der DB!\n"; my $vorname = $obj->param ( "vorname" ); my $nachname = $obj->param ( "nachname" ); my $strasse = $obj->param ( "strasse" ); my $plz = $obj->param ( "plz" ); my $wohnort = $obj->param ( "wohnort" ); my $email = $obj->param ( "email" ); $dbh->do ( "INSERT INTO test1 VALUES ( '$vorname', '$nachname', '$strasse', '$plz', '$wohnort', '$email' )" ); print $obj->header ( "text/html" ), $obj->start_html ( -title => "Bestätigung" ); print $obj->h3 ( "Das haben Sie eingegeben! \n" ); print $obj->h5 ( $vorname, " ", $nachname ); print $obj->h5 ( $strasse ); print $obj->h5 ( $plz, " ", $wohnort ); print $obj->end_html; $dbh->disconnect(); exit;