On 23 Aug 01, at 11:10, Jeremy Morano wrote:

> $result = @mysql_query($sql,$connection) or die("Couldn't execute query.");
> 
> 
> while ($row = mysql_fetch_array($result)) {
> $uid = $row['uid']
> $team = $row['team'];

if ($uid == $row['uid'])
{

        $option_block .= "<option value=\"$uid\" selected>$team</option>";

} else {

>       $option_block .= "<option value=\"$uid\">$team</option>";

}

>       $option_block .= "<option value=\"$uid\">$team</option>";
> }

[etc]

Basically, you need to see if the value they selected is the one you're 
currently working with and add the 'selected' attribute to your <option> 
tag.  If it's not then just keep on going through.

CYA, Dave


-----------------------------------------------------------------------
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au          mailto:[EMAIL PROTECTED]
-----------------------------------------------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to