Ver Mensaje Individual
  #10 (permalink)  
Antiguo 11/04/2016, 10:55
Avatar de xfxstudios
xfxstudios
 
Fecha de Ingreso: junio-2015
Ubicación: Valencia - Venezuela
Mensajes: 2.448
Antigüedad: 8 años, 10 meses
Puntos: 263
Respuesta: for no deja ingresar dos prudoctos

Responde las preguntas que te coloque alli:

Código PHP:
Ver original
  1. //CUAL DE ESTOS CAMPOS ES DINAMICO Y CUAL NO
  2. $idfactura=$_POST['idfactura']; //DE DONDE SACAS ESTE NUMERO DE FACTURA?¿ES NUEVO?¿COMO LO CREAS
  3. $idcedula=$_POST['idcedula'];
  4. $fecha=$_POST['fecha'];
  5. $costetotal=$_POST['costetotal'];
  6. $iddetalle_factura=$_POST['iddetalle_factura']; //QUE PUNTO TOCA ESTE DE AQUI Y QUE DIFERENCIA TIENE DEL ANTERIOR
  7. $idproductos=$_POST['idproductos'];
  8. $cantprod=$_POST['chk_group3'];
  9. $coste=$_POST['chk_group2'];
  10. $personas=$_POST['personas'];
  11. $evento=$_POST['evento'];
  12. $lugar_evento=$_POST['lugar_evento'];
  13. $dia=$_POST['dia'];
  14. $hora_evento=$_POST['hora_evento'];
  15.  
  16.  
  17. //QUE FINALIDAD TIENE ESTA CONSULTA DE AQUI
  18.   $sql="SELECT * FROM factura WHERE idfactura='$idfactura'";
  19.   $res=mysql_query($sql,$link);
  20.   $nrows=mysql_num_rows($res);
  21.   if($nrows==0){
  22.  
  23. // ...

Respondiendo esas preguntas podríamos llegar a una solución de tu código
__________________
[email protected]
HITCEL