News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
How to Upload Files with CodeIgniter and AJAX
September 12, 2011 @ 12:03:27

New from NetTuts.com today there's a tutorial for those using the CodeIgniter framework for their application. It shows how to upload files with Ajax and a simple form (with jQuery and AjaxFileUpload).

Uploading files asnychronously can be a pain at the best of times, but when coupled with CodeIgniter, it can be a particularly frustrating experience. I finally found a way that not only works consistently, but keeps to the MVC pattern.

They help you create a database table to store the file information in (filename and title), make the controller to handle the request and build the view (with the form). Also included is the javascript you'll need to get the AjaxFileUpload script working for your file upload field. They extend the controller to handle the file upload and make a model to handle the upload and fetching of file information. The tutorial is finished off with a simple "delete" action to remove any file that's been uploaded.

0 comments voice your opinion now!
tutorial ajax upload codeigniter framework


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Top 10 phpMyAdmin Tips and Tricks You May Not Know

Jim Plush's Blog: How to Install the MyBic Firebug PHP Debugger

Brian Swan's Blog: Performance Tuning PHP Apps on Windows/IIS with Output Caching

Jason Gilmore's Blog: Sixteen Best Practices- and Productivity-Related PHP Tutorials

PHPRiot.com: Zend Framework 101: Zend_Loader


Community Events





Don't see your event here?
Let us know!


unittest laravel testing developer language code interview threedevsandamaybe symfony2 series framework api list community refactor introduction opinion install release podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework