Ver Mensaje Individual
  #11 (permalink)  
Antiguo 30/01/2015, 07:21
Avatar de fede5426
fede5426
 
Fecha de Ingreso: diciembre-2014
Ubicación: Córdoba
Mensajes: 446
Antigüedad: 9 años, 5 meses
Puntos: 208
Respuesta: Consulta php y mysql. Repite datos.

La tabla esta dentro de un while, while es un bucle, quizas por eso se repiten los botones. Intenta sacando el while..

Almacena el array de la misma forma:

$reg = mysql_fetch_array($result)

y abajo todo el contenido que pusiste en el while.

Código PHP:
Ver original
  1. $reg = mysql_fetch_array($result);
  2.  
  3. echo "<table border='1px' text-align='center'>";
  4.  
  5.    
  6.     echo "<tr>";
  7.         echo "<td>";echo 'Bienvenido, '.$_SESSION['ncompleto'];
  8.         echo "</td>";
  9.        
  10.         echo "<td>";
  11.             echo '<a href="logout.php" >(Salir)</a> ';
  12.         echo "</td>";
  13.     echo "</tr>";
  14.        
  15.     echo "<tr>";
  16.         echo "<td colspan='2' align='center'>Examenes</td>";
  17.     echo "</tr>";
  18.    
  19.     echo "<tr>";
  20.    
  21.         echo "<td>";
  22.             echo '<input type="button" value="Ver examenes." onclick="window.location.href=\'examenes/verexamenes.php\'"/>';
  23.         echo "</td>";
  24.        
  25.         echo "<td>";
  26.             echo '<input type="button" value="Agregar examenes." onclick="window.location.href=\'examenes/altas/formAltasDeExamenes.php\'"/>';
  27.         echo "</td>";
  28.     echo "</tr>";
  29.    
  30.     echo "<tr>";
  31.         echo "<td colspan='2' align='center'>Personas</td>";
  32.     echo "</tr>";
  33.     echo "<tr>";
  34.    
  35.         echo "<td>";
  36.             echo '<input type="button" value="Ver personas." disabled="true"/>';
  37.         echo "</td>";
  38.        
  39.         echo "<td>";
  40.             echo '<input type="button" value="Agregar personas." onclick="window.location.href=\'persona/altaspersona/altapersona.htm\'"/>';
  41.         echo "</td>";
  42.     echo "</tr>";
  43.    
  44.         echo "<tr>";
  45.         echo "<td colspan='2' align='center'>Profesores</td>";
  46.     echo "</tr>";
  47.     echo "<tr>";
  48.    
  49.         echo "<td>";
  50.             echo '<input type="button" value="Ver profesores." disabled="true"/>';
  51.         echo "</td>";
  52.        
  53.         echo "<td>";
  54.             echo '<input type="button" value="Agregar profesores." disabled=tue/>';
  55.         echo "</td>";
  56.     echo "</tr>";
  57.    
  58.    
  59.     echo "<tr>";
  60.         echo "<td colspan='2' align='center'>Alumnos</td>";
  61.     echo "</tr>";
  62.    
  63.     echo "<tr>";
  64.         echo "<td>";
  65.             echo '<input type="button" value="Ver alumnos." disabled="true"/>';
  66.         echo "</td>";
  67.        
  68.         echo "<td>";
  69.             echo '<input type="button" value="Agregar alumnos." disabled=tue/>';
  70.         echo "</td>";
  71.     echo "</tr>";
  72.    
  73.  
  74.     echo "<tr>";
  75.         echo "<td colspan='2' align='center'>Grupo</td>";
  76.     echo "</tr>";
  77.    
  78.     echo "<tr>";
  79.         echo "<td>";
  80.             echo '<input type="button" value="Ver grupos." disabled="true"/>';
  81.         echo "</td>";
  82.        
  83.         echo "<td>";
  84.             echo '<input type="button" value="Agregar grupos." disabled=tue/>';
  85.         echo "</td>";
  86.     echo "</tr>";
  87.    
  88.    
  89.         echo "<tr>";
  90.         echo "<td colspan='2' align='center'>Instituto.</td>";
  91.     echo "</tr>";
  92.    
  93.     echo "<tr>";
  94.         echo "<td>";
  95.             echo '<input type="button" value="Ver instituto." disabled="true"/>';
  96.         echo "</td>";
  97.        
  98.         echo "<td>";
  99.             echo '<input type="button" value="Agregar instituto." disabled=tue/>';
  100.         echo "</td>";
  101.     echo "</tr>";
  102.  echo "</table>";

Probalo asi, saludos!