use Mojolicious::Lite; use DBI qw(:sql_types); # ... get '/eingabe' => sub { my $self = shift; $self->render( 'eingabe' ); }; get '/insert_database' => sub { my $self = shift; my $vorname = $self->param('vorname'); my $nachname = $self->param('nachname'); my $steuernummer = $self->param('steuernummer'); my $ort = $self->param('ort'); my $sth = $dbh->prepare( "INSERT INTO $table ( vorname, nachname, steuernummer, ort ) VALUES ( ?, ?, ?, ? )" ); $sth->execute( $vorname, $nachname, $steuernummer, $ort ); $self->render( 'insert_database' ); }; app->start; __DATA__ @@ eingabe.html.ep % title 'eingabe'; % layout 'green';

Vorname:
Nachname:
Steuernummer:
Ort:

@@ insert_database.html.ep % title 'insert_database'; % layout 'green';

weiter