Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/03/2012, 01:30
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: Porque no me funciona este codigo???? alguien?'?

Sigues utilizando nombres de variables repetidos en whiles anidados:


Código PHP:
Ver original
  1. while ($rowEmp = mysql_fetch_assoc($resEmp)) {
  2.     $not = $rowEmp['nota'];
  3.     $user = $rowEmp['usuario'];
  4.     $fech = $rowEmp['fecha'];
  5.      
  6.     if ($user == $usuario  && $fech == $fecha){
  7.         echo "<p style='font-family:Tahoma, Geneva'><b>Ya Te Evaluaste Hoy tu nota es $not</b></p> <br><br>";
  8.         echo "<a href='form.php'>    <img src='images/volver.png' /></a>";
  9.         return 0;
  10.     }
  11.     else{
  12.         $conexion = mysql_connect("localhost", "root", "ene2012");
  13.         mysql_select_db("usuarios", $conexion);
  14.         $queEmp = "SELECT * FROM cuestionario";
  15.         $resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
  16.         $totEmp = mysql_num_rows($resEmp);
  17.         echo "<form action='resultado.php' method='post' name='formulario'>";
  18.         echo "<table>";
  19.  
  20.         while ($rowEmp = mysql_fetch_assoc($resEmp)) {
__________________
Fere libenter homines, id quod volunt, credunt.