...

View Full Version : listbox selection



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

abduraooft
06-22-2010, 01:27 PM
pls give a solution If you want to show all the fetched values from DB in separate text fields, then you need to move the text fields also into the loop.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum