Entrada destacada

Freddie Armando Romero Paredes Plans

Freddie Armando Romero Plans Leer más publicaciones en Calaméo

domingo, 19 de marzo de 2023

V1b

No. RUC: $dato1"; echo "
No. DNI: $dato2"; echo "
No. CELULAR: $dato3"; $c1=0;$c2=0;$c3=0; if(strlen($dato1) == 11 and is_numeric($dato1) and substr($dato1,0,1) > 0) { echo "
RUC:$dato1 ES CORRECTO";$c1=1;} else { echo "
RUC:$dato1 ES INCORRECTO LONGITUD=".strlen($dato1);} if(strlen($dato2) == 8 and is_numeric($dato2) and substr($dato2,1,1) > 0 ) { echo "
DNI:$dato2 ES CORRECTO";$c2=1;} else { echo "
DNI:$dato2 ES INCORRECTO LONGITUD=".strlen($dato2);} if(strlen($dato3) == 9 and is_numeric($dato3) and substr($dato3,0,1)== 9 ) { echo "
CELULAR:$dato3 ES CORRECTO";$c3=1;} else { echo "
CELULAR:$dato3 ES INCORRECTO LONGITUD= ".strlen($dato3)." PRIMER DIGITO ES ".substr($dato3,0,1);} if($c1==1 and $c2==1 and $c3==1 ) { echo "
DATOS CORRECTOS
";} else { echo "
HAY ERRORES, FAVOR DE CORREGIR
";} ?>

No hay comentarios:

Publicar un comentario