![]() |
Avatar image upload and member addition - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Avatar image upload and member addition (/showthread.php?tid=50514) |
Avatar image upload and member addition - El Forum - 03-28-2012 [eluser]ptvw2011[/eluser] Hi- I cant seem to get my head around so any help would be appreciated. I have an upload function which I want to re-use in multiple cases. How could I run this same function for different forms that contain different elements? So I have form A which has various elements but will run do_upload_1 to upload an avatar form B will also run do_upload_1 in the same way with different elements. At the moment I have the avatar upload as a separate form on the same page which has resulted in all sorts of stupid workarounds with temporary database tables. Thanks PTVW Avatar image upload and member addition - El Forum - 03-28-2012 [eluser]skunkbad[/eluser] [quote author="ptvw2011" date="1332969187"]Hi- I cant seem to get my head around so any help would be appreciated. I have an upload function which I want to re-use in multiple cases. How could I run this same function for different forms that contain different elements? So I have form A which has various elements but will run do_upload_1 to upload an avatar form B will also run do_upload_1 in the same way with different elements. At the moment I have the avatar upload as a separate form on the same page which has resulted in all sorts of stupid workarounds with temporary database tables. Thanks PTVW [/quote] You should check out my Community Auth. It has an example of an uploader (ajax and falls back on php). It's a good working example for you. |