Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/08/2003, 15:56
Avatar de camargo
camargo
 
Fecha de Ingreso: abril-2002
Ubicación: Kerétaro, Méjiko
Mensajes: 1.045
Antigüedad: 22 años
Puntos: 2
ALgunas pequeñas modificaciones:

Código PHP:
//conexion a la bd mysql

$id=$_GET['id'];
$sql mysql_query("SELECT * FROM imageneschuscas WHERE id='$id'");
$imagen mysql_result($sql,0,"imagen");
$row mysql_fetch_array($sql);
$tipo $row["tipo"];
Header ("Content-type: $tipo");
$img imagecreatefromstring($imagen);
$picsize 123;
$new_w imagesx($src_img);
$new_h imagesy($src_img);
$aspect_ratio $new_h $new_w;
$new_w $picsize;
$new_h abs($new_w $aspect_ratio);
$dst_img ImageCreateTrueColor($new_w,$new_h);
 
imagecopyresampled($dst_img,$img,0,0,0,0,$new_w,$n
ew_h
,imagesx($img),imagesy($img));$name $row["nombre"];
$separar explode('.',$name);
image.$separar[1]($dst_img,'',100); 
y para obtener la imagen::


<img src=\"imagen.php?id".$row["id"]."\">
__________________
http://www.chorcha.com

Última edición por camargo; 11/08/2003 a las 15:59