El Forum
07-18-2007, 10:05 PM
[eluser]Chad Crowell[/eluser]
With this in my controller, the form view displays fine:
However, the second function, to collect the form data, keeps the form view from showing up. I can't figure out whats wrong.
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...
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...