Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/09/2010, 05:43
Avatar de OsSk4R
OsSk4R
 
Fecha de Ingreso: octubre-2006
Ubicación: $this->home
Mensajes: 824
Antigüedad: 17 años, 6 meses
Puntos: 74
Respuesta: Si rellena un campo obligar a rellenar otro

Buenas,

Prueba así:

Código PHP:
Ver original
  1. <?php
  2. if (empty($_POST['campo_1']) and empty($_POST['campo_2']) or !empty($_POST['campo_1']) and !empty($_POST['campo_2']))
  3. {
  4.     echo "bien";
  5.    
  6. }else{
  7.    
  8.     echo "mal";
  9.    
  10. }
  11. ?>

Saludos,