bamboli
06-22-2010, 08:18 AM
i am a beginner in php....
i try to print vaues in to textboxes corresponding listbox item selection...
now i got only the last database values in to the textboxes...
$DB=new database();
$scheme=new Scheme($DB,$SchemeId,$UserId,$Schemehours,$SchemeAmount);
$a=array();
$a=$scheme->displayschemehours($SchemeId);
$i=0;
if(count($a)>$i)
{
$Schemehours=$a[$i]['scheme_hours'];
$SchemeAmount=$a[$i]['scheme_amount'];
$i++;
}
<input type="text" name="txtschemehours" value="<? print $Schemehours?>" />
<input type="text" name="txtschemeamount" value="<? print $SchemeAmount?>" />
pls give a solution
i try to print vaues in to textboxes corresponding listbox item selection...
now i got only the last database values in to the textboxes...
$DB=new database();
$scheme=new Scheme($DB,$SchemeId,$UserId,$Schemehours,$SchemeAmount);
$a=array();
$a=$scheme->displayschemehours($SchemeId);
$i=0;
if(count($a)>$i)
{
$Schemehours=$a[$i]['scheme_hours'];
$SchemeAmount=$a[$i]['scheme_amount'];
$i++;
}
<input type="text" name="txtschemehours" value="<? print $Schemehours?>" />
<input type="text" name="txtschemeamount" value="<? print $SchemeAmount?>" />
pls give a solution