Welcome Guest, Not a member yet? Register   Sign In
Multiple File Upload with SWFUpload
#2

[eluser]jmadsen[/eluser]
There are two parts to this - the upload confirmation, and the insert confirmation.

I don't know how much you have, but for future readers:


Code:
function insert_item(){
        unset($_POST['submit']);
        if ($this->input->post('image') ==''){
            $file_name = do_upload('./images/items/');
            $_POST['image'] = $file_name;
        }
        $this->db->insert('items',$_POST);
                $id = $this->db->insert_id();
// error check on your $id that it returned a valid value
// if it did, go do your next bit
    }



http://ellislab.com/codeigniter/user-gui...ading.html

Will give some basic uploading code

----

Hope that helps you get started.

(Also - no point working when you are that tired - rested coding is 12.43 times faster and more bug free than all-nighter code. Go sleep. )


Messages In This Thread
Multiple File Upload with SWFUpload - by El Forum - 02-07-2010, 11:56 PM
Multiple File Upload with SWFUpload - by El Forum - 02-08-2010, 01:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB