juliano_campos

Erro ao chamar principal.php

Apr 30th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2.  
  3.  header ("Content-type: text/html; charset= utf-8");
  4.  error_reporting(0);
  5.   require_once("conexion.php");
  6.    
  7.     Class Usuarios
  8.     {
  9.        
  10.         public function logueo(){
  11.             if (empty($_POST["usuario"]) or empty($_POST["pass"]))
  12.             {
  13.                 echo "Preencher todos os Campos";
  14.             }
  15.             else {
  16.                 $sql="select * from usuario where usuario=' ".$_POST["usuario"]." ' and pass=' ".$_POST["pass"]." ' ";
  17.                 $row= pq_query(Conectar::con().$sql);
  18.                 if(pg_fetch_array($row)>0)  {
  19.                     $_SESSION["session_user"]=$_POST["usuario"];
  20.                     header("Location : principal.php");
  21.                     }
  22.                
  23.                 else {
  24.                     echo "Datos Erroneos";
  25.                      }
  26.                  }
  27.            
  28.                                 }  
  29.  
  30.     }  
  31. ?>
Add Comment
Please, Sign In to add comment