I was trying to send images to the database, and the best way was to save them in a directory and just send the name to MYSQL, but when I send a gif, it n goes to the directory but it goes normally for mysql ...
<?php
require ('connect.php');
mysql_connect("$host", "$usuario", "$senha");
mysql_select_db("$bd");
if ($_POST['enviar']) {
$nome = $_POST['nome'];
$usuario = $_POST['usuario'];
$senha = $_POST['senha'];
$foto = $_FILES['foto']['tmp_name'];
$extensao = strtolower(pathinfo($_FILES['foto']['name'], PATHINFO_EXTENSION));
$nome_imagem = uniqid();
$caminho_imagem = "imagens";
$search = mysql_query("SELECT * FROM usuarios WHERE usuario='$usuario'");
$checar = mysql_num_rows($search);
//if ($checar == 0) {
mysql_query("INSERT INTO usuarios(nome,usuario,senha,foto) values('".$nome."','".$usuario."','".$senha."','".$nome_imagem.".".$extensao."')");
move_uploaded_file ($foto, $caminho_imagem."/".$nome_imagem.".".$extensao);
//}
}
This is the registration code ...