Welcome Guest, Not a member yet? Register   Sign In
Image Upload help
#2

[eluser]leonardteo[/eluser]
Heya,

Well, I won't post the full solution but kinda point you in the right direction.

In your controller function here:
Code:
function add_article()
    {

//Add file upload handling code here. Look here on how to do that:
http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html

//Get the path to the image that is uploaded. Use that for the 'preview_img' string.

        $now = date("Y-m-d");
        $data = array(
                    'title' => $this->input->post('title'),
                    'body' => $this->input->post('body'),
                    'author' => $this->input->post('author'),
                    'category_id' => $this->input->post('category_id'),
                    'preview_img' => $this->input->post('preview_img'),  
                    'date' => $now
                    );
                    
        $this->db->insert('articles', $data);
    }


Messages In This Thread
Image Upload help - by El Forum - 08-30-2010, 02:38 PM
Image Upload help - by El Forum - 08-30-2010, 06:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB