Olá, boa noite Primeiramente obrigada. Segui a orientação acima , mas não consegui fazer a conexao com o banco apresentou o seguinte erro: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Como já dito anteriormente tenho pouco conhecimento em php+mysql. Apenas muita vontade em aprender. Vejamos: Criei uma conexão sem ser através do uso do config.php e funcionou. Isto quando iniciei os primeiros passos. Agora estou tentando seguir o raciocinio de um curso php através de video aulas para criar um site completo. Porém não estou conseguindo fazer o include do config.php Criei o config.php <? $db = mysql_connect("localhost","root",""); $dado = mysql_select_db("projeto_final",$db); ?> O arquivo cadastrar_foto <html> <head> <title>UPLOAD DE IMAGEM</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form1" method="post" action="funcao.php?funcao=gravar" enctype="multipart/form-data"><h1Cadastrar Foto</h1> <p> <input type="radio" name="enviar_arquivo" onclick="document.form1.arquivo.disabled=false" value="sim"> <strong>SIM</strong> <input type="radio" name="enviar_arquivo" onclick="document.form1.arquivo.disabled=true"value="não" checked="checked"> <strong>NÃO</strong> </p> <p> <input name="arquivo" type="file" size="50" disabled="disabled"> </p> <p> <input type="submit" name="Submit" value="Enviar"> </p> </form> </body> </html> E o arquivo funcao <? $enviar_arquivo = $_POST['enviar_arquivo']; if($_GET['funcao'] == "gravar" && $enviar_arquivo == "sim" && is_file($_FILES['arquivo']['tmp_name'])){ $foto = $_FILES['arquivo']['name']; $foto = str_replace (" ", "_",$foto); $foto = str_replace ("ã", "a",$foto); $foto = str_replace ("á", "a",$foto); $foto = str_replace ("à", "a",$foto); $foto = str_replace ("é", "e",$foto); $foto = str_replace ("ê", "e",$foto); $foto = str_replace ("è", "e",$foto); $foto = str_replace ("í", "i",$foto); $foto = str_replace ("ì", "i",$foto); $foto = str_replace ("ó","o",$foto); $foto = str_replace ("ô","o",$foto); $foto = str_replace ("ç","c",$foto); $foto = strtolower($foto); if(!eregi("^image\/(jpeg|png|gif|pjpeg|jpg)$", $_FILES['arquivo']['type'])){ echo" <META HTTP-EQUIV=REFRESH CONTENT=0; URL=cadastrar.foto.php'> <script type=\"text/javascript\"> alert(\"Formato inválido\"); </script> "; }else{ if(file_exists("fotos/$foto")){ $a =1; while(file_exists("fotos/[$a]$foto")){ $a++; } $foto = "[".$a.]".$foto; } if(!move_uploaded_file($_FILES['arquivo']['tmp_name'],"fotos/".$foto)){ echo" <META HTTP-EQUIV=REFRESH CONTENT='0; URL=cadastrar.foto.php'> <script type=\"text/javascript\"> alert(\"Erro ao enviar o arquivo\"); </script> "; } } include "config.php"; $sql = mysql_query("INSERT INTO upload (foto) value ('$foto')"); header("Location: cadastrar_foto.php"); }else{ header("Location: cadastrar_foto.php"); } ?> Só que ele não chama o banco de dados. O que devo fazer? Obrigada