[HELP] upload |
[eluser]C_Line[/eluser]
i wan to upload a image Code: view how to do ?
[eluser]InsiteFX[/eluser]
It helps if you read the CodeIgniter Users Guide CodeIgniter Users Guide - File Uploading Class
[eluser]C_Line[/eluser]
i already read it, but i don't understand, every time i submit it always display nothing heres my code Code: view why it display nothing ?
[eluser]InsiteFX[/eluser]
Because you are not loading a view for it. All your upload information will be in the $data array Code: echo $data['full_path'];
[eluser]C_Line[/eluser]
i already call it this look like this Code: view why it display nothing and how to save the file i upload to my folder (gambar)
[eluser]LuckyFella73[/eluser]
It's like InsideFX said - look here: Code: if ( ! $this->upload->do_upload()) No matter if the uload was successful or not you just assign the upload data to $data. You have to call a view and diplay something like uploads data or a message like "all fine" or "upload failed". You better let your model return "FALSE" in case the upload failed and return the upload data in case the upload was successful. In your controller you call the model and call a view depending an what your model returned. |
Welcome Guest, Not a member yet? Register Sign In |