Erreur fatale : appel à une fonction inconnue sha()
Solved
Zakarya93
Posted messages
1026
Status
Member
-
Zakarya93 Posted messages 1026 Status Member -
Zakarya93 Posted messages 1026 Status Member -
Hello,
I have this error: Fatal error: Call to undefined function sha() in C:\wamp\www\rs\functions\login.func.php on line 9
My login.func.php:
What should I do? Thanks in advance :)
I have this error: Fatal error: Call to undefined function sha() in C:\wamp\www\rs\functions\login.func.php on line 9
My login.func.php:
<?php //the function that will verify the combination username/password function verifier_combinaison_pseudo_password($pseudo,$password) { $pseudo = htmlspecialchars(strip_tags($_POST['pseudo'])); $password = htmlspecialchars(strip_tags($_POST['password'])); $password = sha($password); $bdd = new PDO('mysql:host=localhost;dbname=rs;charset=utf8', 'root', ''); //therefore, the verification: $req = $bdd->query('SELECT COUNT(*) FROM utilisateurs WHERE pseudo="'.$pseudo.'" AND password="'.$password.'"'); $etat = $req->fetchColumn(); if($etat == 0){ return 0; }else{ return 1; } } ?> What should I do? Thanks in advance :)