Hi Keven,

On Thu, Sep 09, 2004 at 07:16:45PM -0400, Keven Murphy wrote:
> I cannot figure out why the below html source page is hosed up. Why is
> embperl not putting the body (the frist part, the forms) between the
> <body> </body> lines. My code is below:

It's because you're printing - in general, you don't want to that with
Embperl. This:

> [-
> $req->{query} = $req->{dbh}->prepare($qry) or die "Cound not Execute:
> $DB::errstr";
> $req->{query}->execute();
> 
> 
> 
> print start_form;
> #print "<HR>";
> 
> print "<H1>Systems Check</H1>";
> print submit;
> 
> 
> 
> print "<TABLE WIDTH=\"50%\">";
> print "<TR>";
> print "<TH ALIGN=\"CENTER\">Select<\/TH>";
> print "<TH ALIGN=\"LEFT\">ID<\/TH>";
> print "<TH ALIGN=\"LEFT\">Report Name<\/TH>";
> print "<TH ALIGN=\"LEFT\">Loc<\/TH>";
> print "<TH ALIGN=\"LEFT\">Date and Time<\/TH>";
> 
> while ( @rows = $req->{query}->fetchrow) {
>     print "<TR>";
>     print "<TD ALIGN=\"CENTER\"><INPUT TYPE=\"radio\" NAME=\"repid\"
> VALUE=\"$rows[0]\"><\/TD>";
>     for ($num = 0; $num < 4; $num++) {
>        print "<TD ALIGN=\"LEFT\">$rows[$num]<\/TD>";
>     }
>     print "<\/TR>";
> }
> print "<\/TABLE>";
> 
> print end_form;
> -]

should be more like:

[-
$req->{query} = $req->{dbh}->prepare($qry) or die "Cound not Execute: $DB::errstr";
$req->{query}->execute();
-]
[+ start_form +]
<H1>Systems Check</H1>
[+ submit +]
<TABLE WIDTH="50%">
<TR>
<TH ALIGN="CENTER">Select</TH>
<TH ALIGN="LEFT">ID</TH>
<TH ALIGN="LEFT">Report Name</TH>
<TH ALIGN="LEFT">Loc</TH>
<TH ALIGN="LEFT">Date and Time</TH>
</TR>
[$ while ( @rows = $req->{query}->fetchrow) $]
<TR>
<TD ALIGN="CENTER"><INPUT TYPE="radio" NAME="repid"> VALUE="[+ $rows[0] +]"></TD>
[$   foreach ($num = 0; $num < 4; $num++) $]
<TD ALIGN="LEFT">[+ $rows[$num] +]</TD>
[$   endforeach $]
</TR>
[$ endwhile $]
</TABLE>
[+ end_form +]


or something like that. :-)

Cheers,
Gavin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to