#!/bin/perl use strict; use mysql; use CGI qw(:standard); my $edit = param('edit'); my $edit1 = param('edit1'); my $descr=param('descr'); my $bedin=param('bedingung'); my $wert=param('wert'); my $dbh = DBI->connect("DBI:mysql:database=c2;host=localhost",'root','', {RaiseError => 1}); print header(); print "\n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "Check editieren\n"; if ($edit eq "") { my $sth = $dbh->prepare("select ind,description,beding,wert from checks order by 'description'"); $sth->execute; print "\n"; } else { if ($edit1 eq "Edit") { my $sth = $dbh->prepare("select ind,description,beding,wert from checks where ind='$edit'"); $sth->execute; while (my $ref = $sth->fetchrow_arrayref()) { print "\n"; } } if ($edit1 eq "Speichern") { $dbh->do("update checks set description='$descr', beding='$bedin', wert='$wert' where ind='$edit'"); #print "update checks set description='$descr', beding='$bedin', wert='$wert' where ind='$edit'"; print "