i cant get my image into mysql, have tried everything and it simply wont work. I have specified the enctype="multipart/form-data" in the form but here is my code to insert into the database, there are other input fields which i am trying to submit at the same time:
<?php
// User details can be amended through this script
session_start();
include("dbconnect.inc");
if ($_POST[submit]){
$file = fopen($_FILES['new_image']['tmp_name']);
$imagefile = addslashes(fread(fopen($file, "r"), filesize($file)));
$sql = "insert into student values('$_POST[new_user]', '$_POST[new_pass]','$_POST[new_fristname]','$_POST[new_lastname]','$_POST[new_DOB]','$_POST[new_house]','$_POST[new_town]','$_POST[new_county]','$_POST[new_country]','$_POST[new_postcode]','$imagefile');";
$result = mysql_query($sql,$conn);
?>
help would be appreciated.