Hi all,

I have probs trying to place the FORM tags before TR tags using PEAR HTML_Table Class...
I'm recovering info from DB in a while() and each table row is an entry of an administration interface, so I need to print each corresponding ID on each row.

My code looks something like this:

while ( DB FETCH )
{
...
$table->setCellAttributes($i,0,array("0"=>"nowrap", "class"=>$CSSclass, "align"=>"center"));
$table->setCellContents($i,0, "<B>".strtoupper($groupID)."</B>");
$table->setCellAttributes($i,1,array("0"=>"nowrap", "class"=>$CSSclass, "align"=>"center"));
$table->setCellContents($i,1, $userID);
...
$table->setCellAttributes($i,8,array("0"=>"nowrap", "class"=>$CSSclass, "align"=>"center", "valign"=>"middle"));
$table->setCellContents($i,8, $submit);	
...
}

I pretend to print the FORM tags somewhere before TR or any other place to avoid FORM that horrible tag effects that makes when you place them inside TD tags the cells.

Even tried something like this... (I know it looks horrible but was a try. ;-)

while ( DB FETCH )
{
...
$table->setCellAttributes($i,0,array("0"=>"nowrap", "class"=>$CSSclass, "align"=>"center"));
$table->setCellContents($i,0, "
<FORM name=\"frmUser$userID\" action=\"/actions.php\" method=\"GET\">
<INPUT type=\"hidden\" name=\"userID\" value=\"$userID\">
<B>".strtoupper($groupID)."</B>");
$table->setCellAttributes($i,1,array("0"=>"nowrap", "class"=>$CSSclass, "align"=>"center"));
$table->setCellContents($i,1, $userID);
...
$table->setCellContents($i,8, $submit.
"</FORM>");	
...
}

So... any of you know how to fix this minor/maxi prob?

Thanks in advance.

    Write a Reply...