while($row2 = mysql_fetch_array($result2)) {
$query_check = "SELECT * FROM articlestosites where articleid = {$id} AND site_id = {$row['id']}";
$result_check = mysql_query($query_check);
if(mysql_num_rows($result_check)){
echo "<option SELECTED>{$row2["articletype"]}</option>";
}else{
echo "<option>{$row2["articletype"]}</option>";
}
}
|