problem of transferring a variable to a drop down list

Links for php scripts

Moderators: macek, egami, gesf

sansoft
New php-forum User
New php-forum User
Posts: 44
Joined: Fri May 07, 2004 2:16 am
Location: India
Contact:

problem of transferring a variable to a drop down list

Postby sansoft » Thu May 13, 2004 4:02 am

Hi all,

this time the problem is abt transferring a var to a drop down list......it goes on something like this....

i wan to edit a project list by means of proj_id..its primary key...ok fine i did it...i am also transferring it....in a drop down list "in the other file" i have a list of projectleaders names in it........now their user_id and proj_leadid are equal.......


what i want is when i a passing the proj_id....to the next file the drop down list shud show the CORRESPONDING projectleader and after that the others in the drop down....

this below code just gives the user_id and the usernames this is in the "otherfile"......help me to show the CORRESPONDING projectleader

$sql="select user_name,user_id from mast_user";

$result=mysql_query($sql,$conn);
$user = "<select name='user3'\n";



while($row = mysql_fetch_array($result))
{




$user.="<option value='".$row["user_id"]."'>".$row["user_name"]."</option>";


}

$user.="</select>";









Sansoft

sansoft
New php-forum User
New php-forum User
Posts: 44
Joined: Fri May 07, 2004 2:16 am
Location: India
Contact:

problem solved

Postby sansoft » Thu May 13, 2004 5:35 am

hi all, the problem is finally solved by me,........

pats on my back!!!!!!!!!!!!!!!!!!! 8O


Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron