Rnery

Login check

Mar 30th, 2022 (edited)
1,241
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 1 0
  1. <?php
  2. require_once "usuarios.php"
  3.  
  4. // Ou User extends classe de cima {
  5.  
  6. class User {
  7.     function checkPOST(){
  8.         if (isset($_POST['usuario'] AND isset($_POST['senha'])) {
  9.             $user = addslashes($_POST['usuario']);
  10.             $passwd = addslashes($_POST['senha']);
  11.         }
  12.     }
  13.  
  14.     function checkLOGIN() {
  15.         if (!empty($usuario) AND !empty($senha)) {
  16.             $u->mysqli_connect("nomeDB", "localhost", "user", "password") or
  17.             die("Credenciais incorretas");
  18.         }
  19.     }
  20. }
  21. ?>
Tags: php
Advertisement
Add Comment
Please, Sign In to add comment