Thread Premature end of script headers (11 answers)
Opened by frank_D at 2004-08-22 16:54

renee
 2004-08-27 10:03
#32590 #32590
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Ersetze diesen Teil:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 if ($sth->rows != 0){
  print $cgi->start_html(-title => 'Antwort');
  print qq~<center><h1>Suchergebnis</h1><hr><table border=1><tr><td width="200"><b>Familienname:</b></td>
           <td width="100"><b>Vorname:</b></td><td width="200"><b>Abteilung:</b></td><td width="100">
           <b>Telefon:</b></td></tr>~;

  while (my ($familienname,$vorname,$abt,$telefon) = $sth->fetchrow_array()) {
    print qq§<tr>\n<td><b>$familienname</b></td>\n<td>$vorname</td>\n<td>$abt</td>\n<td>$telefon</td>\n</tr>\n§;
  }

  print qq§</table>\n<p><a href="formular1.html">Neue Suche</a></p>\n<hr>\n</center>§;
}
else { ##Keine Treffer
  print $cgi->start_html(-title => 'Antwort');
  print qq~<body><p>Leider brachte die Suche keine Ergebnisse!</p><hr><p>
           <a href="http://localhost/formular1.html">Neue Suche!</a></p>~;
}
durch diesen hier:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 print $cgi->start_html(-title => 'Antwort');

my $msg = qq~<center><h1>Suchergebnis</h1><hr><table border=1><tr><td width="200">
             <b>Familienname:</b></td><td width="100"><b>Vorname:</b></td>
             <td width="200"><b>Abteilung:</b></td>
             <td width="100"><b>Telefon:</b></td></tr>~;

my $table = "";
while (my ($familienname,$vorname,$abt,$telefon) = $sth->fetchrow_array()) {
  $table .= qq§<tr>\n<td><b>$familienname</b></td>\n<td>$vorname</td>
               <td>$abt</td>\n<td>$telefon</td>\n</tr>\n§;
}

unless($table){
  $msg = qq~<p>Leider brachte die Suche keine Ergebnisse!</p><hr>~;
}
else{
  $msg .= $table.'</table>';
}

$msg .= qq~<p><a href="formular1.html">Neue Suche</a></p>\n<hr>\n</center>~;
print $msg;
\n\n

<!--EDIT|renee|1093586703-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Premature end of script headers