Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/04/2010, 09:09
den_22
 
Fecha de Ingreso: enero-2010
Mensajes: 198
Antigüedad: 14 años, 3 meses
Puntos: 1
Parse error !

Hola amigos, que tal, estoy con este codigo de subir una imagen a la bd, pero me tira parse error "syntax error, unexpected T_STRING " en la linea 14 que es esta parte :

Código PHP:
Ver original
  1. if (!copy($picture,"pictures/"m.$usuario."_".$picture_name))  echo ("<br>Fallo al subir '$picture_name' ... <br>\n");
  2.     $url="m".$usuario."_".$picture_name;
  3.    };



Dejo todo el codigo por las dudas.


Código PHP:
Ver original
  1. <?php
  2. include("connect.php");
  3.  
  4. $id=$_SESSION['id'];
  5. $usuario=$_SESSION['usuario'];
  6.  
  7. if ($picture=="none") $picture="";
  8.    
  9.   if ($upload)
  10.   {
  11.    
  12.    if ((!$url)&&($picture))
  13.    {
  14.      if (!copy($picture,"pictures/"m.$usuario."_".$picture_name))  echo ("<br>Fallo al subir '$picture_name' ... <br>\n");
  15.     $url="m".$usuario."_".$picture_name;
  16.    };
  17.  
  18. if ($type=="Main") q("update prueba set type='Public' where type='Main' and usuario='$usuario'");
  19. if ($url) q("insert into prueba values('','$usuario','$url','$description','$type','".strtotime(date("d M Y H:i:s"))."','$uploadpicturedisabled')");
  20. };
  21.  
  22. if ($edit&&$picid)
  23. {
  24.  if ($type=="Main") q("update prueba set type='Public' where type='Main' and usuario='$usuario'");
  25.  q("update prueba set details='$description', type='$type' where id='$picid' and usuario='$usuario'");
  26. };
  27.  
  28. if ($delete&&$picid)
  29. {
  30.  q("delete from prueba where id='$picid' and usuario='$usuario'");
  31. };
  32.  
  33.  
  34. }
  35.  
  36. ?>

Gracias.

den_22