Downloaded 11 times

![File Upload
<?php
$connection=mysql_connect('localhost','root','');
$db=mysql_select_db('bcs');
$upload_image_name = $_FILES['upload_image']['name'];
$upload_image_type = $_FILES['upload_image']['type'];
$upload_image_tmp_name = $_FILES['upload_image']['tmp_name'];
$upload_image_size = $_FILES['upload_image']['size'];
$upload_image_error = $_FILES['upload_image']['error '];
$folder = './images/';
$upload = move_uploaded_file($upload_image_tmp_name
, $folder.$upload_image_name);
$insert = mysql_query(" INSERT INTO person SET FirstName = '$upload_image_name'; "
, $connection);
?>
](https://image.slidesharecdn.com/imageuploadinphpmysql-140124040820-phpapp02/75/Image-upload-in-php-MySql-2-2048.jpg)

This document provides code for uploading images to a PHP MySQL database. It includes PHP code to get image details from the uploaded file like name, type, size, and store it in a folder on the server. It also inserts the image name into a database table. There is also HTML form code to upload images by selecting a file and clicking submit.