Upload function not running |
[eluser]überfuzz[/eluser]
I'm building a simple form to mail script. It's supposed to attach a userfile to the mail. Code: function index() Edit, What am I doing wrong here?
[eluser]umefarooq[/eluser]
hi pass form file name to then it will upload you files and also you call your class parameters properly Code: $test = $this->do_upload();
[eluser]überfuzz[/eluser]
[quote author="flemming" date="1257351993"]Don't you need to use Code: $this->email->attach() Edit: sorry - is the upload not working at all? Have you set the enctype of the form correctly?[/quote] I think so. form_open_multipart('test') gives: Code: <form action="http://www.-----.com/test" method="post" enctype="multipart/form-data">
[eluser]überfuzz[/eluser]
[quote author="umefarooq" date="1257352180"]hi pass form file name to then it will upload you files and also you call your class parameters properly Code: $test = $this->do_upload(); Its stated in the user_guide that upload will assume that there is a field called userfile. So the call should work without passing the field name
[eluser]umefarooq[/eluser]
yes it will work fine if you field name is "userfile" that is default filename parameter in upload library if you defining you own field name just like upload or uploadfile then you have to give field name as parameter in do_upload() function you can check user_guide it is also there |
Welcome Guest, Not a member yet? Register Sign In |