Advertisement
rafaelgcostaa

Erro ao conecta painel

Apr 27th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.01 KB | None | 0 0
  1. Segue o login_exe.php
  2.  
  3.  
  4. inicio do código:
  5.  
  6. <?php
  7. session_start();
  8. include "mysql.php";
  9.  
  10. extract($_POST);
  11.  
  12. $login = mysql_query("select * from clientes where email_cliente='$email' and senha='$senha' and status_cliente='ativo'") or print(mysql_error());
  13. $mfa = mysql_fetch_array($login);
  14.  
  15. if(mysql_num_rows($login)>0){
  16.  
  17.     $logado = $mfa['idclientes'];
  18.     $_SESSION['logado'] = $mfa['idclientes'];
  19.     session_register(logado);
  20.    
  21.     $ip = $_SERVER['REMOTE_ADDR'];
  22.     $hora = date("h:i:s");
  23.     $datah = date("d/m/Y");
  24.    
  25.    
  26.    $UUA = "$datah às $hora com o IP: <a href=\"http://www.geoiptool.com/pt/?IP=$ip\" target=\"_blank\" class=\"link2\">$ip</a>";
  27.    
  28.     $UA = mysql_query("update clientes set ultimo_acesso='$UUA' where idclientes='$logado'") or print(mysql_error());
  29.    
  30. echo "<script language='javascript' type='text/javascript'>
  31. window.location.href='index.php';
  32. </script>";
  33.    
  34.    
  35. }else{
  36.  
  37. echo "<script language='javascript' type='text/javascript'>
  38. window.location.href='index.php';
  39. </script>";
  40.  
  41.  
  42. }
  43.  
  44.  
  45.  
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement