pa_bruno 0 Denunciar post Postado Junho 2, 2005 falae galera... to kerendo fazer um formulario de cadastro upload de arquivos (naum somente fotos). Tava kerendo tipo q em um formulario eu colocasse o titulo do arquivo (eu mesmo escrevendo) o arquivo por intermedio do inputfile (acho q eh isso) e mais uns 2 campos por ae... keria q o caminho da foto ficasse gravado no BD e a foto fosse enviada pra uma pasta no servidor... jah ateh consegui fazer com que a foto seja copiada pro servidor, diretorio... mas qnd coloquei pra ir pro BD ocaminho naum consegui... alguem ae poderia me dar uma forcinha ae??? valeeeew.... Compartilhar este post Link para o post Compartilhar em outros sites
pa_bruno 0 Denunciar post Postado Junho 3, 2005 ninguém??? http://forum.imasters.com.br/public/style_emoticons/default/cry.gif Compartilhar este post Link para o post Compartilhar em outros sites
Alex Hiroshi 7 Denunciar post Postado Junho 3, 2005 hehe.. fica mais facil você falar como tentou fazer, assim podemos te mostar o erro que está fazendo... fica melhor para você aprender ;) Aprenda com os erros..Poste o script que está tentando usar.. Compartilhar este post Link para o post Compartilhar em outros sites
pa_bruno 0 Denunciar post Postado Junho 3, 2005 hm.. show d bola.. perae... jah posto.. ;) Compartilhar este post Link para o post Compartilhar em outros sites
pa_bruno 0 Denunciar post Postado Junho 3, 2005 são 3 arquivos: videos.php <html> <head> <title>copy()</title> <script language="JavaScript"> <!-- function teste(){ if(document.upload.link.value==""){ alert("Arquivo para upload não informado!"); document.upload.link.focus(); return false } } //--> </script> </head> <body> <form action="enviaVideo.php" enctype="multipart/form-data" method="post" onSubmit="return teste()"> <input type="text" name="titulo" size="30" /><br> <textarea name="descricao" cols="28" rows="6"></textarea><br> <input type="file" name="link" /><br> <input type="submit" value="Submit"> </form> </body> </html> enviaVideo.php PHP [*] [*]<? [*]include("conexao02.php"); [*] [*]if (!empty($link) and is_file($link)) { [*]$caminho="../../../videos/"; [*]$caminho=$caminho.$link_name; [*]copy($link,$caminho); [*]# grava o $arquivo no $caminho especificado [*]echo "<h1>O arquivo foi transferido!</h1>"; [*]}else{ [*]echo "<h1>O arquivo não foi transferido!</h1>"; [*]echo "<h2><font color='red'>Caminho ou nome de arquivo Inválido</font></h2>"; [*]} [*]$insere = mysql_query("INSERT INTO tb_videos (titulo,descricao,link) VALUES('{$_POST['titulo']}','{$_POST['descricao']}',$caminho"); [*]echo "<h3 align='center'>Vídeo Cadastrado!</h3>"; [*]?> [*] listaVideos.php PHP [*] [*]<? [*]include("conexao02.php"); [*]?> [*]<html> [*]<head> [*]<title>copy()</title> [*]</head> [*]<body> [*]<? [*] $rs = mysql_query("select * from tb_videos order by id desc"); [*] echo "Abaixo segue a lista de itens do Produto selecionado:<br /><br />"; [*] for($t=1; $t <= mysql_affected_rows();$t++) { [*] $row = mysql_fetch_array($rs); [*] echo "{$row['titulo']}<br />"; [*] echo "{$row['descricao']}<br />"; [*] echo "<br><a href='{$row['link']}'>{$row['link']}</a>"; [*] echo "<br><br>"; [*] } [*]?> [*]</body> [*]</html> [*] o problema tah no enviaVideo.php ele naum completa o upload... aparece a msg: O arquivo não foi transferido!Caminho ou nome de arquivo InválidoNotice: Undefined variable: caminho in c:\program files\easyphp1-8\www\radialistas\admin\members\fckeditor\enviavideo.php on line 14Vídeo Cadastrado!num entendi mto bem naum... Compartilhar este post Link para o post Compartilhar em outros sites
pa_bruno 0 Denunciar post Postado Junho 3, 2005 jahconsegui, valeeew... http://forum.imasters.com.br/public/style_emoticons/default/joia.gif Compartilhar este post Link para o post Compartilhar em outros sites