$newq=mysql_query("SELECT * from userrights WHERE UserId=$Id");
$array=array();

$r1=mysql_fetch_array($newq);
$menuid=$r1['MenuId'];
<select   name="page[]" multiple="multiple"   size="5" >
          <option disabled="disabled" value="">Choose one</option>
          <?php 
         $query1=mysql_query("SELECT * FROM adminmenu");
while($row1=mysql_fetch_array($query1)){
    $selected = ($menuid == $row1['MenuId'] ? 'selected="selected"' : ''); 
echo"<option value='$row1[MenuId]' $selected >".$row1['MenuName']."</option>";
}
?>
        </select>

What?? So what are we expected to do??

on update i want that admin can see the result on multi combo box and if user can acess two page or three page or more or less then admin can see can select and can edit
but this is all done but i have to do only this that if user have permession of the page on combox that page selected

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.