Tema: if else
Ver Mensaje Individual
  #10 (permalink)  
Antiguo 19/11/2010, 12:39
Avatar de fermin3d
fermin3d
 
Fecha de Ingreso: octubre-2010
Ubicación: sevilla
Mensajes: 141
Antigüedad: 13 años, 6 meses
Puntos: 4
Respuesta: if else

Cita:
Iniciado por Hidek1 Ver Mensaje
esa condicion esta negando los empty...

<?php
if (!empty($_POST['usuario'])||!empty($_POST['nombre'])||!empty($_POST['dni'])){
$host="localhost";
$user="root";
$password="";
$db="registro";
$usuario=$_POST["usuario"];
$nombre=$_POST["nombre"];
$dni=$_POST["dni"];
$email=$_POST["email"];
$cont=$_POST["cont"];
$cont2=$_POST["cont2"];
Ok lo e corregido y me da mal aun
este es el cambio
Código PHP:
Ver original
  1. <?php
  2. if(!empty($_POST['usuario'])||!empty($_POST['nombre'])||!empty($_POST['dni'])||!empty($_POST['email'])||!empty($_POST['cont'])||!empty($_POST['cont2'])||!empty($_POST['prov_inter'])){
  3. echo 'mal';
  4. } else {
  5. $host="localhost";
  6. $user="root";
  7. $password="";
  8. $db="registro";
  9. $usuario=$_POST["usuario"];
  10. $nombre=$_POST["nombre"];
  11. $dni=$_POST["dni"];
  12. $email=$_POST["email"];
  13. $cont=$_POST["cont"];
  14. $cont2=$_POST["cont2"];
  15. ect.......
en la pantalla muestra mal.


muchas gracias