I am having difficulty with the code. I am trying to upload the file to the server folder and insert in to SQL BLOB. Neither one of it works. Any suggestions?
<?php mysql_connect ("host","user","pass")
mysql_select_db("pics")
$image= addslashes($_FILES['file']['tmp_name']);
$name= addslashes($_FILES['file']['name']);
$image= file_get_contents($image);
$image= base64_encode($image);
if (move_uploaded_file ($_FILES["file"]["tmp_name"], "http://www.website.com/uploads/".$_FILES["file"]["name"])) {
$insert = mysql_query ("INSERT INTO pics (name,file) values ('$name','$image')");
}
else "error uploading query to database";
?>