Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/08/2011, 00:41
rcoelloz
 
Fecha de Ingreso: junio-2011
Ubicación: Concepcion
Mensajes: 2
Antigüedad: 12 años, 10 meses
Puntos: 0
Exclamación crear catalogo de productos configurable

Hola, bueno les comento mi problema, necesito hacer un catalogo de productos configurable, osea que el dueño de la pagina entrara a catalogo.php y podra ver los productos, insertar, modificar y ocutar uno (no eliminarlo), mi problema es que no se como seleccionar una fila para poder editarla, adjunto un screenshot para que pueda entender mejor.
estoy trabajando en localhost, con dreamweaver y mysql.


adjuntare el codigo por si es necesario
Código PHP:
Ver original
  1. <?php require_once('Connections/base.php'); ?>
  2. <?php
  3. $maxRows_Recordset1 = 20;
  4. $pageNum_Recordset1 = 0;
  5. if (isset($_GET['pageNum_Recordset1'])) {
  6.   $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
  7. }
  8. $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
  9.  
  10. mysql_select_db($database_base, $base);
  11. $query_Recordset1 = "SELECT * FROM catalogo";
  12. $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
  13. $Recordset1 = mysql_query($query_limit_Recordset1, $base) or die(mysql_error());
  14. $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  15.  
  16. if (isset($_GET['totalRows_Recordset1'])) {
  17.   $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
  18. } else {
  19.   $all_Recordset1 = mysql_query($query_Recordset1);
  20.   $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
  21. }
  22. $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
  23. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  27. <title>Documento sin t&iacute;tulo</title>
  28. </head>
  29.  
  30. <body>
  31. <table width="966" border="0" cellspacing="1" bordercolor="#FF0000">
  32.   <tr>
  33.     <td width="476" height="93" align="center" valign="middle"><table width="965" height="102" border="1" align="center" cellspacing="1" bordercolor="#000000">
  34.       <tr>
  35.         <td height="21" colspan="4" align="center" valign="middle">Lista de Productos </td>
  36.         <td width="96" height="21" align="center" valign="middle"><a href="insertar.php">Insertar</a></td>
  37.         <td width="97" align="center" valign="middle"><a href="editar.php">Editar</a></td>
  38.         <td width="92" align="center" valign="middle"><a href="ocultar.php">Ocultar</a></td>
  39.       </tr>
  40.       <tr>
  41.         <td width="49" height="23" align="center" valign="middle">&nbsp;</td>
  42.         <td width="50" align="center" valign="middle">id</td>
  43.         <td width="210" align="center" valign="middle">Nombre</td>
  44.         <td width="341" align="center" valign="middle">Descripcion</td>
  45.         <td colspan="3" align="center" valign="middle">Imagen</td>
  46.       </tr>
  47. <?php do { ?>
  48.       <tr>
  49.           <td height="21"><form id="form1" name="form1" method="post" action="">
  50.             <label>
  51.               <input <?php if (!(strcmp($row_Recordset1['id'],$row_Recordset1['id']))) {echo "checked=\"checked\"";} ?> type="checkbox" name="checkbox" value="checkbox" />
  52.               </label>
  53.           </form>          </td>
  54.           <td height="21"><?php echo $row_Recordset1['id']; ?></td>
  55.           <td><?php echo $row_Recordset1['nombre']; ?></td>
  56.           <td><?php echo $row_Recordset1['descripcion']; ?></td>
  57.           <td colspan="3"><?php echo $row_Recordset1['imagen']; ?></td>
  58.       <tr>
  59.   <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
  60.     <td height="21" colspan="4" align="right">Total Productos </td>
  61.     <td colspan="3">&nbsp;<?php echo $totalRows_Recordset1 ?> </td>
  62.   </tr>
  63.     </table>
  64.    
  65. </body>
  66. </html>
  67. <?php
  68. mysql_free_result($Recordset1);
  69. ?>


ojala me puedan ayudar..