Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/03/2011, 20:08
hiram_ramirez8
 
Fecha de Ingreso: enero-2011
Mensajes: 104
Antigüedad: 13 años, 3 meses
Puntos: 0
Respuesta: Brincar un registro

ok mira ahi te va todo el codigo: este es el codigo completo!!!
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Facultad de Psicolog&iacute;a</title>
  5. </head>
  6. <body bgcolor="#990000">
  7. <center><div style="width:872px; border:outset #009; background:#FFF; overflow: auto;">
  8. <table height="20" width="55%" align="center">
  9.     <tr>
  10.         <td align="center"><img src="logo psicologia.JPG"/></td>
  11.     </tr>
  12.     <tr>
  13.         <td align="center"><input type="button" name="Grabar" id="Grabar" value="Grabar Encuesta" onclick="location.href = 'grabar.php'"/>
  14.                            <input type="button" name="inicio" id="inicio" value="Inicio" onclick="location.href = 'index.php'"/></td>
  15.     </tr>
  16.     <tr>
  17.         <td align="center">Estos son los Encuestados hasta el Momento</td>
  18.     </tr>
  19. </table></div></center>
Código PHP:
Ver original
  1. <?
  2. $conexion=mysql_connect(localhost,root,developer);
  3.               if (!$conexion)
  4.                   {
  5.                   die('No se puede Conectar al Servidor: ' . mysql_error());
  6.                   }
  7.              
  8.               mysql_select_db(dbpsicologia,$conexion);
  9.                    
  10.                     $select=" SELECT pre.eCodPregunta num, pre.tNombre pregunta, res.Identificador, res.tNombre respuesta ".
  11.                             " FROM subida AS sub ".
  12.                             " INNER JOIN preguntas AS pre ON sub.eCodPregunta = pre.eCodPregunta ".
  13.                             " INNER JOIN respuestas AS res ON sub.eCodRespuesta = res.eCodRespuesta ";
  14.              
  15.               $rsEncuestados = mysql_query($select, $conexion);
  16.                $rEncuestados = mysql_fetch_array($rsEncuestados);
  17.     mysql_close($conexion);
  18. //print $select;
  19. ?>
Código HTML:
Ver original
  1. <center><div style="width:872px; border:outset #009; background:#FFF; overflow: auto;">
  2. <table height="20" width="55%" align="center" border="0">
  3.  
  4.     <tr>
  5.         <td align="center" bgcolor="#CCCCCC">N&uacute;mero</td>
  6.         <td align="center" bgcolor="#CCCCCC">Preguntas</td>
  7.         <td align="center" bgcolor="#CCCCCC">Identificadores</td>
  8.         <td align="center" bgcolor="#CCCCCC">Respuestas</td>
  9.     </tr>
  10.    
  11.     <tr>
  12.     <? while($rEncuestados = mysql_fetch_array($rsEncuestados)) { ?>
  13.         <tr>
  14.         </tr>
  15.         <tr onmousemove="this.style.background='#CCCCCC'" onmouseout="this.style.background='#FFFFFF'">
  16.             <td align="center" nowrap="nowrap" height="20"><?=$rEncuestados{'num'} ?></td>
  17.             <td align="left" nowrap="nowrap" height="20"><?=utf8_encode($rEncuestados{'pregunta'}) ?></td>
  18.             <td align="center" nowrap="nowrap" height="20"><?=$rEncuestados{'Identificador'}; ?></td>
  19.             <td align="left" nowrap="nowrap" height="20"><?=utf8_encode($rEncuestados{'respuesta'}); ?></td>
  20.         </tr>
  21.     <? } ?>
  22.     </tr>
  23.  
  24. </table></div></center>
  25. </body>
  26. </html>