Ver Mensaje Individual
  #9 (permalink)  
Antiguo 17/11/2008, 20:57
Avatar de hernansam
hernansam
 
Fecha de Ingreso: septiembre-2007
Ubicación: Funes , Argentina
Mensajes: 204
Antigüedad: 16 años, 8 meses
Puntos: 0
Respuesta: imprimir fotos subida al ftp

bueno mira ya mas o menos arregle el codigo , pero mira lo que me tira

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING


Código PHP:
<?php $link=mysql_connect("localhost","root","pass");
mysql_select_db("sistema_de_noticias",$link);

if (isset(
$_POST['submit'])){
if (
is_uploaded_file($_FILES['fichero']['tmp_name'])){
   
$ruta"foto/".$_FILES['fichero']['name'];
   if(
move_uploaded_file($_FILES['fichero']['tmp_name'],$ruta)){
   
              
              
mysql_query("INSERT INTO imagenes (ruta) values ('$ruta')",$link)or die (mysql_error());
             
        }
     } 
 } 
// A continuación el formulario

?>

<form action=<?=$PHP_SELF?> method="post" enctype="multipart/form-data"/>
<p class="Estilo1">
  <label></label>
</p>
<table width="316" height="66" border="0">
  <tr>
    <td width="87" height="34"><span class="Estilo1">Subir Foto :</span></td>
    <td width="201"><input name="fichero" type="file" /></td>
  </tr><tr>
    <td height="26" colspan="2"><input name="submit" type="submit" value="Subir" /></td>
    </tr>
</table>
</form>
<?php 
$link
=mysql_query("SELECT * FROM imagenes ",$link);

echo 
"<img src=$link['ruta'] >"
?>