Por ejemplo pongo los pasos desde el principio para ver si estoy añadiendo algo mal que todo es posible.
Visualizo todos los registros: productos_tod.php
Código PHP:
<?php
mysql_connect("localhost","xxx","xxx") or die ("no se ha podido conectar a la BD");
mysql_select_db("xxx") or die ("No se ha podido seleccionar la BD");
$sql = "SELECT * FROM productos";
$consulta = mysql_query($sql) or die ("No se pudo ejecutar la consulta");
While ($registro=mysql_fetch_assoc($consulta)){
echo "<td><span class=\"textoperfil\">ID:</span> <a href=\"productos_ver.php?id=".$registro['id']."\" > ".$registro['referencia']."</td>";
echo "<td><span class=\"textoperfil\">Nombre:</span> ".$registro['nombre']."</td>";
echo "<td><span class=\"textoperfil\">Estado:</span> ".$registro['estado']."</td>";
}
?>
Código:
que en la linea 175 esta </html>:Parse error: syntax error, unexpected $end in /home/gekuar/public_html/navarro/admin/productos_ver.php on line 175
Código PHP:
<?$id = $_GET['id'];?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="fondo_panel">
</div><?php
include("conex.php");
$link=Conectarse();
$result=mysql_query("select * from productos WHERE id='$id'",$link);
if ($row = mysql_fetch_array($result)){
mysql_field_seek($result,0);
$nombre = $row['nombre'];?>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Nombre:</span></td>
</tr>
<tr>
<td colspan="2" bordercolor="#CCCCCC"><span class="productos_texto1"><div align="left"><?=$row['nombre']?></div></span></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Descripción:</span></td>
</tr>
<tr>
<td colspan="2" bordercolor="#CCCCCC"><div align="left"><?=$row['descripcion']?></div></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Código:</span></td>
</tr>
<tr>
<td colspan="2" bordercolor="#CCCCCC"><span class="productos_texto1"><div align="left"><?=$row['codigo']?></div></span></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Precio:</span></td>
</tr>
<tr>
<td colspan="2" bordercolor="#CCCCCC"><span class="productos_texto1"><div align="left"> <?=$row['precio']?>€ Impuestos no incluidos (IVA no incluido) </div></span></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Fabricante:</span></td>
</tr>
<tr>
<td colspan="2" bordercolor="#CCCCCC"><span class="productos_texto1"><div align="left"><?=$row['fabricante']?></div></span></td>
</tr>
</table></td>
<td width="250">
<table width="100" border="1" align="center" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="250" bordercolor="#CCCCCC"><img src="imagenes/logo_empresa.jpg" alt="Muebles Hermanos Navarro, S.L." width="300" height="159"></td>
</tr>
<tr>
<td bordercolor="#CCCCCC"><div align="center"><span class="productos_texto1"></span></div></td>
</tr>
</table>
<div align="right"></div></td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Otros datos:</span></td>
</tr>
<tr bordercolor="#FFFFFF">
<td colspan="2" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Menú:</span> <?=$row['menu']?></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Estado:</span><?=$row['estado']?></td>
</tr>
</table></td>
<td><table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Descuento:</span> <?=$row['descuento']?></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#FFFFFF" bgcolor="#CCCCCC"><img src="imagenes/spacio.gif" width="10" height="10"></td>
<td width="100%" bordercolor="#CCCCCC"><span class="productos_texto">Oferta:</span> <?=$row['oferta']?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="1" height="1"></td>
<td bordercolor="#CCCCCC"><span class="productos_texto">Estilo:</span><img src="imagenes/spacio.gif" width="8" height="8"><span class="productos_texto1"><?=$row['estilo']?></span></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="10" bordercolor="#000000" bgcolor="#42919E"><img src="imagenes/spacio.gif" width="8" height="8"></td>
<td bordercolor="#CCCCCC"><span class="productos_texto">Tipo:<img src="imagenes/spacio.gif" width="1" height="1"></span><span class="productos_texto1"><?=$row['tipo']?></span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<div align="center"></div></td>
</tr>
<tr>
<td colspan="2">
<table width="20" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<td width="250" bordercolor="#CCCCCC"><div align="center"><img src="ver.php?id=<?=$row['id']?>"></div></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>