Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/05/2004, 11:59
eagoweb2
 
Fecha de Ingreso: septiembre-2003
Mensajes: 384
Antigüedad: 20 años, 7 meses
Puntos: 0
Pregunta problema actualizando tabla

Mi problema esta en que cuando quiero arreglar un producto de la lista que me sale no me aparece en el form para actualizar, a que se debe?
Código PHP:
<?
include('../inc/cone.php');//conecto a la base de datos
$prefijo="es"//con esta variable me conecto a las tablas de español;
?>
<html>
<head>
<title>UNtitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
Sistema de Administración
<?
if($_GET['id']){
$productosq "SELECT * FROM productos_".$prefijo." WHERE enlace = '$id'";
}else{
$productosq "SELECT * FROM productos_".$prefijo."";}

$productosr mysql_query($productosq$db_conn
        or die (
"Busqueda Producto Fallido");

$prod mysql_fetch_array($productosr);
$adminr mysql_query("SELECT * FROM productos_".$prefijo."");
echo 
"<center>Listado general: <br></center><br><br>";
echo 
"<center><table border = '1' bgcolor='#336699'> \n";
while (
$row mysql_fetch_array($adminr))
{
echo 
"<tr> \n";
echo 
"<td> <a href=?id=$prod[enlace]> <font color='#ffffff' size=3> $row[1] </font> </td></a> \n";
echo 
"</tr> \n";
$prod mysql_fetch_array($productosr);
}
echo 
"</table> \n</center>";
?>
<?
if ($_GET['id']){
echo 
"trabajando con el producto:.$id";
$productosq "SELECT * FROM productos_".$prefijo." WHERE enlace = ".$id."";
$prod mysql_fetch_array($productosr);
}
?>
<body>
<form action="<?$PHP_SELF;?>" method="post">
  Enlace: 
  <input name="enlace" type="text" value="<?=$prod['enlace'];?>" size="25" maxlength="25"><br>
Nombre del Producto: <input name="nombre" type="text" value="<?=$prod['nombre'];?>" size="25" maxlength="25"><br>
Ingredientes: 
  <input name="ingredientes" value="<?=$prod['ingredientes'];?>" size="5000" maxlength="5000">
  <br>
Funsión: <input name="funcion" type="text" value="<?=$prod['funcion'];?>" size="5000" maxlength="5000"><br>
Modo de Uso: <input name="modouso" type="text" value="<?=$prod['modouso'];?>" size="5000" maxlength="5000"><br>
Metodo de Guaradar: <input name="metodosave" type="text" value="<?=$prod['metodosave'];?>" size="5000" maxlength="5000"><br>
Cantidad en ML: <input name="modouso" type="text" value="<?=$prod['cantidad'];?>" size="5000" maxlength="5000"><br>
Otro: <input name="otro" type="text" value="<?=$prod['otro'];?>" size="5000" maxlength="5000"><br>
Foto: images/productos/<input name="modouso" type="text" value="<?=$prod['foto'];?>" size="5000" maxlength="5000"><br>
Precio: <input name="Precio" type="text" value="<?=$prod['precio'];?>" size="5000" maxlength="5000"><br>
Comentario: <input name="comentario" type="text" value="<?=$prod['comentario'];?>" size="5000" maxlength="5000"><br>
<input name="Guardar" type="submit">
</form>
</body>
</html>