#!/usr/bin/perl use DBI; use CGI; $db='mebel'; $u='mebel'; $p='MeBeL'; $cgi=new CGI; $id=$cgi->param("id"); if ($id eq 1) { print "Location: http://www.akvilon-mebel.spb.ru/cont.htm\n\n"; exit; } $stm="select firms.name,adres.str,adres.tel,adres.fax,adres.email from firms,adres where adres.id=".$id." and firms.id=adres.id"; $dbh = DBI->connect("DBI:mysql:$db", $u, $p); $sth = $dbh->prepare($stm) or die "Can't prepare $stm: $dbh->errstr\n"; $rv = $sth->execute or die "can't execute the query: $sth->errstr\n"; $rc = $dbh->disconnect; @row = $sth->fetchrow_array; print "Content-type: text/html\n\n"; print "Адрес фирмы $row[0]"; print ""; print "


"; print ""; print ""; print ""; print ""; print ""; print "
 \"$row[0]\"
адрес$row[1]
телефон$row[2]
факс$row[3]
email$row[4]
прайс-листпоказать
 назад
";