Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1.  
  2. $db = "prova";
  3. mysql_select_db($db) or exit("Impossibile aprire il DB $db");
  4.  
  5. $queryRis = mysql_query("SELECT * FROM login WHERE user='$username' and pass='$password'") or exit("Problemi in query");
  6. $riga = mysql_fetch_array($queryRis);
  7.  
  8. if (!$riga) {
  9. header("location: login.php");
  10. $_SESSION['connesso']=false;
  11. };
  12. if ($riga) {
  13. echo "Accesso effettuato";
  14. $_SESSION['connesso']=true;
  15.  
  16. header('Location: index.php');
  17.  
  18. exit;
  19. };
  20.  
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement