[PHP] login

fabry1986

Nuovo Utente
11 Feb 2017
7
2
1
39
salve a tutti, ho un problema con questo login, mi compare questo errore quando loggo
Fatal error: Call to undefined function user_exists() in C:\Users\Fabry\Desktop\xampp\htdocs\www.flare-manga.com\login.php on line 17

mi potete aiutare???



PHP:
include('config.php');



if (empty($_POST) === false){
    $username = $_POST['username'];
    $password = $_POST['password'];
   
     if (empty($username)=== true || empty($password) === true) {
         $errors[] = 'You need to enter a username and password';
       
       
       
     }else if (user_exists($username) === false) {   \\ linea 17 l'errore dovrebbe essere qui
         $errors[] = 'We can\'t find that username. Have you registered?';
       
     }elseif (user_active($username) === false) {
         $errors[] = 'You haven\'t activated your account';
     }else {
         $login = login($username, $password);
         if ($login === false) {
             $errors[] = 'that username/password combination is incorrect';
         } else {
             $_SESSION['user_id'] = $login;
             header('Location: index.php');
             exit;
         }
       
     }
     print_r($errors);
 
}
 
Ciao,
Fatal error: Call to undefined function user_exists()
tradotto vuol dire : stai chiamando una funzone non definita
da qualche parte dovresti avere la dichiarazione della funzione
PHP:
function user_exists() {
  // codice
}
se è in un file esterno devi includerlo
 

Discussioni simili