KEMBAR78
Image upload in php MySql | PPTX
Image Upload
in PHP MySql
By ishaq Shinwari
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);
?>













<html>
<head>
</head>
<body>
<form name = "upload" method = "post" action = '' enctype
= "multipart/form-data">
<input type = "file" name = "upload_image" />
<input type = "submit" name = "submit" value = "upload">
</form>
</body>
</html>

Image upload in php MySql