I'm trying to upload a file to the database. Except that instead of sending the file itself, it is sending the temporary location of it.
My code looks like this:
$arquivo = $_FILES['arquivo'];
$name = $arquivo['name'];
$file_tmp = $arquivo['tmp_name'];
$file_bin = mysqli_real_escape_string(file_get_contents($file_tmp));
$conn = mysqli_connect('localhost', 'root', '', 'files');
$sql = "INSERT INTO malote_arq (arquivo, nome) VALUES('$file_bin', '$name')";
mysqli_query($conn, $sql);
C: wamp mpphpF1F2.tmp