Can anybody help me? I am trying to upload image to database as LONGBLOB
but when i check on the database the uploaded image have only 12 B instead of 148KiB, hence it can't display!!
I wanted to upload the image on a file and store the image path on the database but i don't know how to do it, because i want to display image on a table respective to component information/details.
<?php
include "conn.php";
if(isset($_POST['submit'])) {
$comp_id=$_POST['comp_id'];
$compname=$_POST['compname'];
$image=$_POST['image'];
$description=$_POST['description'];
$category=$_POST['category'];
$subcat=$_POST['subcat'];
$tech_id=$_POST['tech_id'];
$query = mysql_query("INSERT INTO `resourcesys`.`ecomp_t`
(`comp_id`,`compname`,`image`,`description`,`category`,`subcat`,`tech_id`)
VALUES ('$comp_id','$compname','$image','$description','$category','$subcat','$tech_id')")
or die(mysql_error());
echo "<script>alert('Your component has been added successfully !!');</script>";
}