fetch_data(); } protected function fetch_data(){ // les data... $this->transactype_list=array(); $rqt = "select * from transactype order by transactype_name"; $res = mysql_query($rqt); $i=0; if(mysql_num_rows($res)){ while($row = mysql_fetch_object($res)){ $this->transactype_list[$i]['id'] = $row->transactype_id; $this->transactype_list[$i]['name'] = $row->transactype_name; $this->transactype_list[$i]['unit_price'] = $row->transactype_unit_price; $this->transactype_list[$i]['quick_allowed'] = $row->transactype_quick_allowed; $i++; } } } public function get_form(){ global $msg; global $transactype_list_form, $charset; foreach ($this->transactype_list as $index =>$transactype){ if ($parity++ % 2) $pair_impair = "even"; else $pair_impair = "odd"; if($transactype['quick_allowed']) $quick_allowed="x"; else $quick_allowed=""; $form.= "