Upload an Image And display it on the same page in php(TYPE 1) | Techbirds

Posted on: December 10, 2013 /

Categories: PHP / Author Name: Shivek Parmar

Well you can find many tutorials on web about how to upload an image and display it in php. Then what is different in this Blog Post.

Well the tutorials that you will find on different websites needs different files of php to upload an image, to fetch it from database, and to display it on the web page. Its not the best practice to Upload the Image and display the image on the same page but with the learning point of view and for beginners of php it is the best tutorial.

The code we are using here is very simple and any php beginner can understand it without any complaint.

Create a php file with the name “ImageUpload.php” and copy and  paste the following code.
If you are a beginner or an expert in php then you must know what is the purpose of including “config.php” file in the following code.

Uploading image to MySQL database and displaying it

Upload Form

3,163 total views, 1 views today

Share this Onfacebook-1553197twitter-8769894linkedin-7019952google-5672757