![]() |
Send File by Email through Form on Web Site? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Send File by Email through Form on Web Site? (/showthread.php?tid=30316) |
Send File by Email through Form on Web Site? - El Forum - 05-13-2010 [eluser]invision[/eluser] Can anyone help me out with this? Thanks again Send File by Email through Form on Web Site? - El Forum - 05-13-2010 [eluser]eoinmcg[/eluser] the error message is pretty self explanatory. you're calling the apply method but not supplying $slug i see from your view that slug is posted from the form, rather than passed by url. Code: function apply() Send File by Email through Form on Web Site? - El Forum - 05-13-2010 [eluser]invision[/eluser] OK, I think I'm getting there. It submits and sends the email, but doesn't attach the file. When I submit the form I get this message on the page: Code: A PHP Error was encountered My Controller: Code: function apply(){ Thanks again for all your help, I think we're nearly there. Send File by Email through Form on Web Site? - El Forum - 05-13-2010 [eluser]invision[/eluser] Hi Eoin, could you possibly take another final look at this? Really appreciate the help so far, but I'm super stuck with this. Thanks again Send File by Email through Form on Web Site? - El Forum - 05-14-2010 [eluser]eoinmcg[/eluser] have you tried debugging it yourself? nobody is going to write your code for you. the best way to learn is break the problem down into small steps. and lots of coffee read your code carefully, read through the excellent user guide and search the forums - these problems have been solved many, many, times here. good luck! Send File by Email through Form on Web Site? - El Forum - 05-14-2010 [eluser]invision[/eluser] Sounds good to me. I'm just always a little bit nervous with it, but I suppose, what's the worst that can happen. I'll be back when I make some progress ![]() Send File by Email through Form on Web Site? - El Forum - 05-14-2010 [eluser]invision[/eluser] Starting to break it down, I notice I'm getting an issue here. It's definitely storing the file name in $_FILES['file']['name']; It seems to be this spot here: $file_name = $this->do_upload(); where it goes wrong. The whole do_upload part just doesn't seem to want to play ball. I've tried the Upload demos on the server and it works great. Any ideas? Send File by Email through Form on Web Site? - El Forum - 05-14-2010 [eluser]invision[/eluser] Nope, no idea what I'm doing here, any help you can give is greatly appreciated at this hair-tearing stage. Send File by Email through Form on Web Site? - El Forum - 05-14-2010 [eluser]danmontgomery[/eluser] http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html Quote:$this->upload->do_upload() Send File by Email through Form on Web Site? - El Forum - 05-14-2010 [eluser]invision[/eluser] Thanks for this. I actually changed it to userfile an hour or so ago. But now I'm getting a stack of errors ![]() Bit gutted. |