druveen 0 Newbie Poster

hi i am getting field names in $productname through post method that i have to insert into while loop....

while($res=mysql_fetch_array($result))
{
    $resproductname=$res $productname;'];
}

is there any way to do that ...plz help...thanks in advance...