Welcome Guest, Not a member yet? Register   Sign In
unsupported operand types
#1

[eluser]Unknown[/eluser]
hi all,

i'm currently having a problem with this error
it says
Code:
Unsupported operand types

here's the code
controller
Code:
function get_tariff()
{
  
  
  $this->load->model('model_tariff');
  $data['destination']=$this->input->post('dest',true);
  $data['lines']=$this->input->post('lines',true);
  $data['weight']=$this->input->post('weight',true);
  $data['priceperkg']=$this->model_tariff->get_tariff();
  $data['pricetotal']=$data['priceperkg']* $data['weight'];
  $this->load->view('tariff_result',$data);
       }


my model

Code:
function get_tariff()
    {
  
   $destination=$this->input->post('dest');
   $lines=$this->input->post('lines');
   $weightt=$this->input->post('weight');
   $this->db->select('price');
   $this->db->from('view_tariff');
   $this->db->where('city_name',$destination);
   $this->db->where('lines',$lines);
   $price=$this->db->get();
   return $price->result();


and the view

Code:
Price per kg <?php echo $priceperkg?>
Bayar total <?php echo $pricetotall?>



i'll appreciate if there's someone can help me...
thanks in advance


FIXED, thanks




Theme © iAndrew 2016 - Forum software by © MyBB