Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php
  2.  
  3. if (isset($_GET['username']) AND isset($_GET['password']))
  4. {
  5. $bdd = new PDO('mysql:host=localhost;dbname=mybb;charset=utf8', 'root', '');
  6.  
  7. $req = $bdd->prepare('SELECT * FROM mybb_user WHERE username = ? LIMIT 1');
  8. $req->execute(array($_GET['username']));
  9.  
  10. if ($account = $req->fetch())
  11. {
  12. $hashpass = md5(md5($account['salt']).md5($_GET['password']))
  13. if ($hashpass == $account['password'])
  14. echo "ça marche !"
  15. else
  16. echo "non"
  17. }
  18. }
  19.  
  20. ?>
  21.  
  22. ERREUR -> ( ! ) Parse error: syntax error, unexpected 'if' (T_IF) in C:\wamp64\www\onAccount.php on line 13
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement