Assuming that the form is POSTed
try....
$dquery = "UPDATE user_profile SET ";
foreach($_POST as $key => $value)
{
$dquery .= " $key='$value', ";
}
$dquery .= " username='$username' where username = '$username' and profile_seq = '".$_POST['profile_seq']."'";
$uresult = mysql_query($dquery);
table names and field name supplied in the example are for one of mine, this code works.