hi i am having problems uploading images to my database via a Form the column it is uploaded to is set as a longblob. it does't upload aythig except the path to the image???
<table width="480" cellspacing="1" cellpadding="0" border="0" class="formtext">
<form name="form2" method="post" action="subcom.php" enctype="multipart/form-data" onsubmit="return v.exec()">
<tr>
<td align="right" width="150" id="t_logo">
<font color="red">*</font>Logo:
</td>
<td align="left" width="330">
<input type="file" name="vcLogo" />
</td>
</tr>
<tr>
<td colspan="2" align="center"><br />
<input name="submit" type="submit" class="button" value="Preview Your Company" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input class="button" type="reset" name="reset" value="Reset Message" />
</td>
</tr>
</form>
</table>
I have missed out most of input fields i the form to maske it shorter.
Here is my submit code which writes everything to the database except for the image.
<?
session_start();
error_reporting(sq);
?>
<?PHP
include("global/connection.php");
error_reporting(7);
{
$insertsql ="insert into tblcompanydetails (vcCompanyName,vcStreetNo,vcStreet,vcCity,vcState,vcPostalCode,vcCountry,vcPhone,vcFaxNo,vcEmail,vcWebsite,vcTaxNo,vcRegNo,vcLogo,dtCreatedOn) values ('".addslashes($vcCompanyName)."','".addslashes($vcStreetNo)."','".addslashes($vcStreet)."','".addslashes($vcCity)."','".addslashes($vcState)."','".addslashes($vcPostalCode)."','".addslashes($vcCountry)."','".addslashes($vcPhone)."','".addslashes($vcFaxNo)."','".addslashes($vcEmail)."','".addslashes($vcWebsite)."','".addslashes($vcTaxNo)."','".addslashes($vcRegNo)."','".addslashes($vcLogo)["images"]["name"]."','".date("Y-m-d h:m:s")."')";
$DB_site->query($insertsql);
header("Location:index.php");
exit;
}
?>
<script>
alert("Profile UPdated")
document.location.href="index.php"
</script>