Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/04/2008, 10:32
Avatar de Monimo
Monimo
 
Fecha de Ingreso: noviembre-2007
Ubicación: Mexico Df
Mensajes: 742
Antigüedad: 16 años, 5 meses
Puntos: 69
update en tabla desde php

Ya no puedo mas ya no se como hacer esto, saco de una tabla de la base de datos la informacion que necesito sobre un tramite, lleno la tabla, si aun no esta terminado debo de dar la opcion de que se de como terminado para esto hago aparecer unos chack boxes y cuando se le da click te llama una funcion para hacer el update, el problema eske siempre entra a esa funcion cuando se genera el checkbox, y cuando le das click no hace nada ayuda por favor

Código PHP:
$query="select u.nombre,u.app, u.apm, l.negocio_nombre, t.ot,t.numero_poliza, t.tramite, t.informacion, s.fecha_ingreso, s.fecha_standard, s.estado, s.fecha_terminacion 
    from usuario as u, tramites as t, status as s, linea_negocio as l 
    where t.linea_negocio=l.negocio_id   and t.ot=s.ot_ext and t.id_usuario=u.usuario_id
    "
;
    echo 
"<form action=consulta.php method=post >";
    echo 
"<table border=4>";
            echo
"<tr><td>Nombre del agente</td><td>Linea de negocio</td><td> OT</td><TD>NUMERO DE POLIZA</TD><TD> TRAMITE</TD><TD>INFORMACION</TD><TD>FECHA DE INGRESO</TD><TD>FECHA ESTANDAR</TD><TD>ESTADO</TD><TD>FECHA TERMINO</TD></TR>";
                
$result_verif=mysql_query($query,$conectar);
                echo 
mysql_error();
                
$reg=mysql_fetch_row($result_verif);
                
            echo 
"<TR>";
            while(
$reg=mysql_fetch_array($result_verif))
            {  
                if (
$reg["estado"]=='1')
                {
$var+1;
            echo 
"<TR><TD>".$reg["nombre"]."&nbsp".$reg["app"]."&nbsp".$reg["apm"]."&nbsp</td><td>".$reg["negocio_nombre"]."</td><td>".$reg["ot"]."</td><td>".$reg["numero_poliza"]."</td><td>".$reg["tramite"] ."</td><td>".$reg["informacion"]."</td><td>".$reg["fecha_ingreso"]."</td><td>".$reg["fecha_standard"]."</td><td>TERMINADO </td><td>"$reg["fecha_terminacion"]."</td>"
            
            }
            ELSE
                    {
$var+1;
            echo 
"<TR><TD>".$reg["nombre"]."&nbsp".$reg["app"]."&nbsp".$reg["apm"]."&nbsp</td><td>".$reg["negocio_nombre"]."</td><td>".$reg["ot"]."</td><td>".$reg["numero_poliza"]."</td><td>".$reg["tramite"] ."</td><td>".$reg["informacion"]."</td><td>".$reg["fecha_ingreso"]."</td><td>".$reg["fecha_standard"]."</td><td> EN TRAMITE</td><td>"$reg["fecha_terminacion"]."</td> <td><input type=checkbox name=".$reg["ot"]."id=".$var."Onclick="terminar().";<input type=hidden name=".$var." value=".$reg["ot"]." <td>"
            
            }
            
                    
            }
            
echo 
"</TR>";
echo 
"</TABLE>";
echo 
"<input type=submit value=".$var.">";
echo 
"</form>";

            }
            else
            {
                echo 
"alert";
            }
        }
    }



ya intente ponerle un submit y eso pero nada, YA INTENTE PASARLE VALORES a un hidden, usar un form agh ya no se....ayuda plz

Última edición por Monimo; 22/04/2008 a las 11:19