Ver Mensaje Individual
  #12 (permalink)  
Antiguo 27/01/2011, 20:19
__SDP__
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 8 meses
Puntos: 9
Respuesta: devolver consulta de BD en forma horizontal

Código PHP:
Ver original
  1. <?php
  2. include('config.php');
  3.  
  4. if(isset($_POST["id"])){
  5.    $sql = "select * from child where parent_id = '".$_POST["id"]."'";
  6.    $resultados = mysql_query($sql);
  7.    if($resultados){
  8.    ?>
  9.       <form action="puede2.php?id='.$_POST['id'].'" method="post" id="Raton" name="Raton">
  10.     <table border=0><tr>
  11. <?php   while($row = mysql_fetch_array($resultados)){ ?>
  12.     <td>
  13.          <input name="coordenadas" type="image" class="margen2" img src="files2/'.$row['imagen'].'"width="200" height="200" onclick="coord()" />       
  14.     </td>
  15. <?php   } ?>
  16.     </tr></table>
  17. <?php }
  18.  
  19. }
  20. ?>
  21.  
  22. <?php
  23. //@$x = $_GET["coordenadas_x"];
  24. //@$y = $_GET["coordenadas_y"];
  25. //@$imagen=$_GET["imagen"];
  26. //@$alguien=$_GET["alguien"];
  27. //echo $x;
  28. //echo $y;
  29.  
  30. ?>
  31. <form enctype="multipart/form-data" action="puede2.php?id='.<?php echo $_POST['id']; ?>.'" method="POST">
  32. <table border=0>
  33.    <tr><td><br>etiqueta a tu amigo!:<br></td></tr>
  34.    //////////
  35.    <tr><td><input type="submit" name="nunca_nombre_submit_aqui" value="Enviar Formulario" /><br></td></tr>
  36. </table>
  37. </form>
  38.  
  39.  
  40.  
  41.  
  42. /////////// ESTO NO LO ESTAS USANDO /////////////////////
  43.  
  44. <input type="hidden" name="a" value="'.$x.'" size="4"><br>
  45. <input type="hidden" name="b" value="'.$y.'" size="4"><br>
  46. <input type="hidden" name="d" value="'.$imagen.'" size="40"><br>
  47. <input type="hidden" name="e" value="'.$alguien.'" size="40"><br>

ordenemos la cosa...