Hi K4RLOS and jem24h,
Could you help me please. I’m trying to do almost the same, but instead of filling a select I just want to fill a textfield.
I used the code you used and it works wells. I put and echo sentence to see if $test is good filled and yes. The value a want is there.
Now, I don’t know what I must modifier at function ff_setSelectList($name, $value) to fill just a fieldtext.
Could you help me please.
//
//
$this->execPieceByName('ff_InitLib');
$test = "";
$id = &JFactory::getUser();
mysql_connect("myhost","myuser","mypassword”);
mysql_select_db("mydatabase”);
$lien="SELECT * FROM jos_core_acl_aro WHERE value ='".$id->id."'"; $image=mysql_query($lien) or die (mysql_error());
while($uneligne=mysql_fetch_assoc($image))
{
//$test .= "$uneligne";
$test = $uneligne; // I modified this part too.
}
//
//
function ff_setSelectList($name, $value)
{
global $ff_processor;
for ($r = 0; $r < $ff_processor->rowcount; $r++) {
$row =& $ff_processor->rows[$r];
if ($row->name==$name)
$row->data2 = $value;
unset($row);
} // for
} // ff_setSelectList
//
//
ff_setSelectList('name2', $test);
echo $test. 'Hello'; // $test has the value I want.