Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header ("Content-type: text/html; charset= utf-8");
- error_reporting(0);
- require_once("conexion.php");
- Class Usuarios
- {
- public function logueo(){
- if (empty($_POST["usuario"]) or empty($_POST["pass"]))
- {
- echo "Preencher todos os Campos";
- }
- else {
- $sql="select * from usuario where usuario=' ".$_POST["usuario"]." ' and pass=' ".$_POST["pass"]." ' ";
- $row= pq_query(Conectar::con().$sql);
- if(pg_fetch_array($row)>0) {
- $_SESSION["session_user"]=$_POST["usuario"];
- header("Location : principal.php");
- }
- else {
- echo "Datos Erroneos";
- }
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment