Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/09/2011, 06:49
toyeslomao
 
Fecha de Ingreso: diciembre-2010
Ubicación: tenerife
Mensajes: 60
Antigüedad: 13 años, 4 meses
Puntos: 0
Respuesta: advertencia php

me sigue saliendo el mismo error , aunq ya lo cambie
Código PHP:
Ver original
  1. <?php
  2. ob_start("ob_gzhandler");
  3. mysql_connect("localhost","root","");
  4. mysql_select_db("carrito de compras");
  5. if(isset($_SESSION['carro']))
  6. $carro=$_SESSION['carro'];else $carro=false;
  7. $qry=mysql_query("select * from catalogo order by producto asc");
  8. ?>
  9. <html>
  10. <head>
  11. <title>CAT&Aacute;LOGO</title>
  12. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  13. <style type="text/css">
  14. <!--
  15. .catalogo {
  16. font-family: Verdana, Arial, Helvetica, sans-serif;
  17. font-size: 9px;
  18. color: #333333;
  19. }
  20. -->
  21. </style>
  22. </head>
  23. <body>
  24. <table width="272" align="center" cellpadding="0" cellspacing="0" style="border: 1px solid #000000;">
  25. <tr valign="middle" bordercolor="#FFFFFF" bgcolor="#DFDFDF" class="catalogo">
  26. <td width="170"><strong>Producto</strong></td>
  27. <td width="77"><strong>Precio</strong></td>
  28. <td width="25" align="right"><a href="vercarrito.php?<?php echo SID ?>" title="Ver el contenido del carrito">
  29. <img src="vercarrito.gif" width="25" height="21" border="0"></a></td>
  30. </tr>
  31. <?php
  32.  
  33. while($row=mysql_fetch_assoc($qry)){
  34. if( $qry = mysql_query("SELECT * FROM 'catalogo' where id='".$id."'") ) {
  35.  
  36. }
  37. else {
  38.    echo 'Fallo en la consulta SQL: '.mysql_error();
  39. }  
  40.    
  41. ?>
  42. <tr valign="middle" class="catalogo">
  43. <td><?php echo $row['producto'] ?></td>
  44. <td><?php echo $row['precio'] ?></td>
  45. <td align="center">
  46. <?php
  47. if(!$carro || !isset($carro[md5($row['id'])]['identificador']) || $carro[md5($row['id'])]['identificador']!=md5($row['id'])){
  48.  
  49. ?>
  50. <a href="agregacar.php?<?php echo SID ?>&id=<?php echo $row['id']; ?>">
  51. <img src="productonoagregado.gif" border="0" title="Agregar al Carrito"></a><?php }else
  52.  
  53. {?><a href="borracar.php?<?php echo SID ?>&id=<?php echo $row['id']; ?>">
  54. <img src="productoagregado.gif" border="0" title="Quitar del Carrito"></a><?php } ?></td>
  55. </tr><?php }?>
  56. </table>
  57. </body>
  58. </html>
  59. <?php
  60. ?>