<?php
session_name('CAKEPHP'); session_start();
$PageSecurity = 4;
include('includes/session.inc');
 //echo "SELECT id , realname FROM  www_users where rolepid ='".$_GET['q']."' ";
 $sql_state=DB_query("SELECT id , realname FROM  www_users where rolepid ='".$_GET['q']."' ",$db);		
if(!$sql_state)
{
die('Error.'.DB_error_msg($db));
}
?>
<div style='width:auto;' >
<?php 
while($row=DB_fetch_array($sql_state))
{?>
 <input name="leaduserid[]" type="checkbox" value="<?php  echo $row['id'];?>" /><?php  echo $row['realname'];?><br />
 <?php 
 }

?>
 </div>
 