Commit 557cc1f3 authored by Ajay Tripuramallu's avatar Ajay Tripuramallu

php code for insertion

parent 57084213
<?php
$con =mysqli_connect("localhost","swecha","swecha","files");
if($con==false){
die("ERROR:could not connect." .mysql_connect_error());
}
$image=$_POST['permission_image'];
//getting image data
$product_image = $_FILES['image']['name'];
$product_image_tmp = $_FILES['product_image']['tmp_name'];
move_uploaded_file($product_image_tmp,"upload/$product_image");
$sql="INSERT INTO permissionfiles(image)VALUES('$image')";
$result=mysqli_query($con,$sql);
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment