Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class login{
- public function logar($email,$senha){
- $buscar=mysql_query("select *from usuarios where email='$email' and senha='$senha' and status ='1' limit 1");
- if(mysql_num_rows($buscar)==1){
- $dados=mysql_fetch_array($buscar);
- $_SESSION["email"]=$dados["email"];
- $_SESSION["senha"]=$dados["senha"];
- $_SESSION["nivel"]=$dados["nivel"];
- setcookie("logado",1);
- $log=1;
- }
- if(isset($log)){
- $flash="Voce foi logado com sucesso!!!!";
- }else{
- $flash="Digite seu email ou sua senha corretamente!!!";
- }
- echo $flash;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement