#!/bin/perl use strict; use mysql; use CGI qw(:standard); my $ind = param('ind'); my $del = param('del'); 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 "Todo entfernen\n"; if ($del eq "") { my $sth = $dbh->prepare("select ind,t_host,t_service,t_check,t_alert,t_description from todos order by 'ind'"); $sth->execute; print "\n"; } else { $dbh->do("delete from todos where ind='$del'"); print "