News Feed
Sections




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

PHPBuilder.com:
How to Upload Images Using PHP
February 02, 2009 @ 10:23:00

The PHPBuilder.com site has a quick new tutorial showing how to upload images to your server via a PHP script (including some error checking).

One of the most frequently asked questions about PHP is "how can I use PHP to upload an image". In this article we'll discuss the details of how you can do just that!

Their script is done in three steps - an HTML form to accept the input, the PHP script to handle the upload (working with the $_FILES superglobal) and another HTML page to let the user know their upload was a success. When the file is uploaded, they check for a few things: the internal error PHP could throw, ensuring that the uploaded file exists and checking to ensure that the file is an image. Only then is it moved over to the true uploads directory to be stored.

0 comments voice your opinion now!
upload image example tutorial superglobal files


blog comments powered by Disqus

Similar Posts

MaltBlue.com: Use RouteMatch in Zend Framework 2 For Easy Routing

Skaldrom's Blog: Want to create your own progranning language? Lexer & Parser in PHP!

Zend Developer Zone: Getting Started with MongoDB and PHP

DevShed: Enhancing a URL Handling Helper Class in PHP 5

Abou Kone's Blog: Set up JSON action output in CakePHP 1.3


Community Events





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


series library podcast install community introduction interview package list laravel framework api tips bugfix voicesoftheelephpant deployment release language opinion symfony

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