Thread MySQL Ausgabe als Link mit Tabellenverknüpfung (18 answers)
Opened by Tobax at 2013-03-19 12:33

Tobax
 2013-03-28 07:12
#166714 #166714
User since
2013-03-19
9 Artikel
BenutzerIn
[default_avatar]
Neue Perl-Datei:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!C:/Perl/bin/perl.exe

use DBI;
use warnings;
use mysql;
use HTML::Template;
use HTML;
use CGI;


my $cgi = CGI->new;
print $cgi->header();
my $kunden_id = $cgi->param('$id_kunde');
hole_systemids_uber_kunden_id($kunden_id);

sub hole_systemids_uber_kunden_id {
($kunden_id) = @_;
$query_kdsys = "select ID from tb_systeme where ID=?";
$dbh = DBI->connect("DBI:mysql:projekt1:localhost", 'root', '');
$statement = $dbh->prepare($query_kdsys);
$statement->execute($kunden_id);
@data = $statement->fetchrow_array();
return @data;
}

print @data;


Und HTML dazu:
Code: (dl )
print "<tr><td><input type='checkbox' name='box' value='$id_kunde'/><td><a style='color:#000' href='?$id_kunde'>$kundenname</a></td><td>$wohnort</td><td>$strasse</td><td>$id_kunde</td></tr>\n";

View full thread MySQL Ausgabe als Link mit Tabellenverknüpfung