Hi CrOuZ,
If I got your point correctly I think you got 2 problems here,
In your query, your trying to get results which is not in the 'option' table but still in your select part your referring to option.userid. How can you get the userid data from option table, because the record in the user table doesn`t have matched data in the option table because your using <>.
instead of using != try to use NOT IN
*By the way if option.userid is equal to user.id then why do you need option.userid in the select statement. instead you can use user.id right?
below is the changed query,
<form>
<select>
<?php
$sql = "SELECT DISTINCT(a.id), a.name from user a, `option` b WHERE a.data = '$id' AND a.id NOT IN (SELECT userid FROM `option`)";
$query=mysql_query($sql);
while($row= mysql_fetch_assoc($query)){ ?>
<option value=<?PHP echo $row["id"];?>><?php echo $row["name"];?></option>
<?PHP } ?>
</select></form>
Hope this helps..
Regards,
Niroshan