Welcome Guest, Not a member yet? Register   Sign In
Why does this code break my view?
#1

[eluser]Chad Crowell[/eluser]
With this in my controller, the form view displays fine:

Code:
<?php
class Sell extends Controller {

function index()
{

  $data['title']    = "RunwayJunkie.com - Buy & Sell Designer Clothing";

  $data['templates']   = array("front/templates/header", "front/partials/item_addform", "front/templates/footer");
  
  $this->load->view('front/loader', $data);
}
  
}
?>

However, the second function, to collect the form data, keeps the form view from showing up. I can't figure out whats wrong.

Code:
<?php
class Sell extends Controller {

function index()
{

  $data['title']    = "RunwayJunkie.com - Buy & Sell Designer Clothing";

  $data['templates']   = array("front/templates/header", "front/partials/item_addform", "front/templates/footer");
  
  $this->load->view('front/loader', $data);
}



function insert_item()
{

  $data = array(
   'seller_id'   = '1';
   'category_id'   = $this->input->post('category_id', TRUE);
   'brand_id'   = $this->input->post('brand_id', TRUE);
   'size_id'   = $this->input->post('size_id', TRUE);
   'item_title'  = $this->input->post('item_title', TRUE);
   'item_desc_short' = $this->input->post('item_desc_short', TRUE);
   'item_desc_long' = $this->input->post('item_desc_long', TRUE);
   'price'    = $this->input->post('price', TRUE);
   'condition_id'  = $this->input->post('condition_id', TRUE);
   'color'    = $this->input->post('color', TRUE);
   'material'   = $this->input->post('material', TRUE);
   'measurements'  = $this->input->post('measurements', TRUE);
   'img_1'    = '1';
   'img_2'    = '2';
   'img_3'    = '3';
   'img_4'    = '4';
  );
  
  $this->db->insert('items', $data);
  
}

}
?>


This sort of thing is so frustrating- in the time its taken me to build 3 pages in CI, I could have built this client's entire app in dreamweaver...


Messages In This Thread
Why does this code break my view? - by El Forum - 07-18-2007, 10:05 PM
Why does this code break my view? - by El Forum - 07-18-2007, 10:38 PM
Why does this code break my view? - by El Forum - 07-18-2007, 10:40 PM
Why does this code break my view? - by El Forum - 07-18-2007, 10:50 PM
Why does this code break my view? - by El Forum - 07-18-2007, 10:54 PM
Why does this code break my view? - by El Forum - 07-18-2007, 11:06 PM
Why does this code break my view? - by El Forum - 07-18-2007, 11:13 PM
Why does this code break my view? - by El Forum - 07-19-2007, 04:31 PM
Why does this code break my view? - by El Forum - 07-19-2007, 04:36 PM
Why does this code break my view? - by El Forum - 07-19-2007, 04:45 PM
Why does this code break my view? - by El Forum - 07-19-2007, 04:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB