Hola Amigos tengo el siguiente dilema, agradeceria si me pudieran ayudar, resulta que tengo el siguiente sitio que estoy construyendo... www.comercialagropecuaria.com
al hacer una consulta en el campo que aparece en la pagina como por ejemplo 963000000250304 que es el numero de chip me manda una respuesta de todos los datos referentes a ese chip.ç
ahora bien la consulta que tengo es como logro que ademas me muestre una foto??? asociada al numero de chip?¿
tengo el siguiente codigo con el que hago todo esto para ver la tabla y tengo dos archivos mas uno de estilo y un php para conectarme a la base de datos:
Agraderia si me pudieran ayudar, gracias.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><head>
<title>Busca Chip</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="estilo1.css" type="text/css">
</head>
<body background="franja2.jpg">
<p> </p>
<p> </p>
<p> </p>
<div align="left">
<table width="710" border="0">
<tr>
<td width="568"><img src="cagm.png" width="354" height="271"></td>
<td width="132"><div class="tabla1">
<?
include("conec.php");
$link=Conectarse(); (con este me conecto a la base de datos)
$menu=$_GET[menu];
if ($menu=="") {
echo "
<br>
<br>
<form name='busca_chip' method='post' action='".$_SERVER[PHP_SELF]."?menu=buscachip'>
<br>
<input type='text' name='numchip' size='10'><br>
<input type='submit' value='Buscar Chip'>
</form>
";
}
if ($menu=="buscachip") {
$numchip=$_POST[numchip];
if ($numchip=="") {
echo "<br>El Numero de Chip Ingresado está en blanco, Ingrese un Numero válido<br>";
}
if ($numchip!="") {
$result=mysql_query("select * from MASCOTAS where numascota=".$numchip." LIMIT 1",$link);
while($row = mysql_fetch_array($result)) {
echo "
<table class='tabla1'>
<tr>
<th>Numero Chip</th>
<td>".$row[numascota]."</td>
</tr>
<tr>
<th>Nombre</th>
<td>".$row[nmascota]."</td>
</tr>
<tr>
<th>Raza</th>
<td>".$row[nraza]."</td>
</tr>
<tr>
<th>Color</th>
<td>".$row[ncolor]."</td>
</tr>
<tr>
<th>Clinica Veterinaria</th>
<td>".$row[nclinica]."</td>
</tr>
<tr>
<th>Nombre</th>
<td>".$row[nmascota]."</td>
</tr>
<th>Sexo</th>
<td>".$row[sexo]."</td>
</tr>
<tr>
<th>Médico Tratante</th>
<td>".$row[ndoctor]."</td>
</tr>
<tr>
<th>Teléfono Cliente</th>
<td>".$row[fonocli]."</td>
</tr>
<tr>
<th>Email</th>
<td>".$row[email]."</td>
</tr>
<tr>
<th>Especie</th>
<td>".$row[cespecie]."</td>
</tr>
<tr>
<th>Estado</th>
<td>".$row[estado]."</td>
</tr>
<tr>
<th>Antirrábica</th>
<td>".$row[Rabica]."</td>
</tr>
<tr>
<th>Plagas Parásitos</th>
<td>".$row[Desint]."</td>
</tr>
<tr>
<th>Fotos</th>
<td>".$row[fotos]."</td> (aqui en el campo foto yo quisiera mostrar una foto correspondiente al numero de chip)
</tr>";
}
mysql_free_result($result);
echo "</table>";
}
}
?>
</div></td>
</tr>
</table>
</div>
<p align="center"> </p>
</body>
</html>