Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/02/2003, 22:59
Avatar de mveraa
mveraa
 
Fecha de Ingreso: diciembre-2002
Ubicación: santiago-chilito
Mensajes: 1.931
Antigüedad: 21 años, 4 meses
Puntos: 2
ojala te sirva

hola , este script lee una base de de donde saca el vinculo para llamar a una foto(en el base solo esta el nombre del archivo) , entonces solo pinchas donde dice foto(en la tabla) para que esta aparesca, debes subir la foto via ftp(manualmente) o con un script ..............


chaooooooooo



<?php


$id=mysql_connect("LOCALHOST","root","")or die ("clave fallo");

$conexion=mysql_select_db("flash",$id) or die("no se pudo conectar");






$consulta="SELECT * from autos " ;
$res=mysql_query($consulta) or die ("consulta fallo2");
$num=mysql_num_rows($res);


IF ($num==0)
{
echo "<br>";
echo "<br>";
echo "Lo siento en este momento no tenemos el tipo de vehiculo que busca.";
}
?>
<body background="/intra/fondo%20copiar.jpg">
<div align="center">
<p><font face="Arial, Helvetica, sans-serif">RESULTADOS DE LA BUSQUEDA</font></p>
<table width="75%" border="2">
<tr>
<td height="22" width="21%"><font color="#000066">MARCA</font></td>
<td height="22" width="24%"><font color="#000066">MODELO</font></td>
<td height="22" width="13%"><font color="#000066">A&Ntilde;O</font></td>
<td height="22" width="19%"><font color="#000066">VALOR</font></td>
<td height="22" width="22%"><font color="#000066">FOTO</font></td>
</tr>
</table>
<?php

For ($i=0;$i<$num;$i++)
{
$a=mysql_result($res,$i,1);
$b=mysql_result($res,$i,2);
$c=mysql_result($res,$i,3);
$d=mysql_result($res,$i,4);
$e=mysql_result($res,$i,5);
$f=mysql_result($res,$i,6);



/*echo "$a";
echo "MODELO=$b<BR> ";
echo "$c";
echo "PRECIO=$d<BR>";
echo "FOTO=$e<BR>";
echo "$f<br><BR>";
echo "<a HREF=/otros/".$e.">";*/
?>
<table width="75%" border="5" height="20">
<tr>
<td width="21%"><font size="2" color="#006666"><?php echo "$a";?></font></td>
<td width="24%"><font size="2" color="#006666"><?php echo "$b";?></font></td>
<td width="14%"><font size="2" color="#006666"><?php echo "$c";?></font></td>
<td width="19%"><font size="2" color="#006666"><?php echo "$d";?></font></td>
<td width="22%"><font size="2" color="#006666"><?php echo "<a HREF=/otros/".$e.">FOTO"?></font></td>
</tr>
</table>
<?php

}



?> </div>
<BR>
<BR>
<div align="center"><A href="/selh/DOS1.htm" target="mainFrame">VOLVER</A></div>