Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Alvaro Jr

Busca Simples phpmysql

Recommended Posts

 

 
 $_SESSION['input1'] = $_POST['input1'];
            $where .= $table." LIKE '%".$_SESSION['input1']."%'";
 
           
  
   if ($_POST['input2'] != null){
            $_SESSION['input2'] = $_POST['input2'];
            $where .= " AND sistema_aeronaves.prefixo Like '%".$_SESSION['input2']."%'";
            }
 
           
   if ($_POST['input3'] != null){
            $p_data = explode('/', $_POST['input3']);
 
            $dia = $p_data[0];
            $mes = $p_data[1];
            $ano = $p_data[2];
 
            $_SESSION['input3'] = $ano."-".$mes."-".$dia;
 
           
            }
 
 
 
            if ($_POST['input4'] != null){
            $s_data = explode('/', $_POST['input4']);
 
            $dia_s = $s_data[0];
            $mes_s = $s_data[1];
            $ano_s = $s_data[2];
 
            $_SESSION['input4'] = $ano_s."-".$mes_s."-".$dia_s;
 
            
 
            }
 
    
 
                    
 
                   
  
  
 
            //$_SESSION['input4']; 
            
 
$_SESSION['where'] = $where;
            
//echo $_SESSION['where'];
 
 
 
            
//print_r($_POST);
 
            if($where == ""){
 
                $_SESSION['where'] = null;
            }
 
 
            echo $_SESSION['where'];
            header('Location: '.URL.'controle');
            exit;
 
 
       
   }
 
        public function insere(){
 
 
 
 
 
 
        $this->view('insere');
        }
    }
 

Compartilhar este post


Link para o post
Compartilhar em outros sites

eu estou com erro na parte de

 

 

 
 
           $where .= " data >= '".$_SESSION['input3']."'";
           $where .= " AND data <= '".$_SESSION['input4']."'";
  
            
$_SESSION['where'] = $where;
 
 

 

pega as duas data, inicio e final creio eu que o erro está

$where quando eu insiro ela na session ai da erro fica tudo branco

o problema é esse tem como resolver ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.