Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/07/2014, 10:50
galaktico
 
Fecha de Ingreso: julio-2008
Mensajes: 57
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Consulta Página Detalle / Maestro con PHP

MarcusAurelio, ahora ya no tengo el error de sintaxis:

Mi código de la página detalle quedó así:

<?php
include("conexion.php");
$consulta="SELECT * FROM productos where id_producto ='.$_GET ['id'].'";
$resultado=mysql_query($consulta);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Nombre</td>
<td>Categoria</td>
</tr>
<tr>
<td><?php echo $fila["id_producto"]; ?></td>
<td><?php echo $fila["categoria"]; ?></td>
</tr>
</table>
</body>
</html>

El tema es que no me trae resultados, cuando deberia traerme 1 registro correspondiente al ID seleccionado.

Me podrías ayudar?

Muchas gracias!