Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/12/2008, 16:06
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: problemas un sentencia if

Pues simplemente compara cada if por separado y con un campo booleano:
Código php:
Ver original
  1. $todoBien = true;
  2. if($algo != $otracosa) {
  3.      $todoBien = false;
  4. }
  5. if($otro == $otra) {
  6.      $todoBien = false;
  7. }
  8.  
  9. if($todoBien) {
  10.      // Inserto en la BDD
  11. } else {
  12.      // muestro algun error
  13. }

Saludos.