Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

37 linhas
1.2 KiB

  1. <!DOCTYPE html>
  2. <HTML>
  3. <HEAD>
  4. <link rel="stylesheet" type="text/css" href="style.css">
  5. <TITLE>Logging in</TITLE>
  6. </HEAD>
  7. <BODY>
  8. <CENTER>
  9. <?php
  10. include_once ('connect.php');
  11. $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  12. session_start();
  13. $username = mysqli_real_escape_string($con, $_POST['username']);
  14. $password = mysqli_real_escape_string($con, $_POST['password']);
  15. $password = sha1($password);
  16. if ($con->connect_errno > 0){
  17. die ('Unable to connect to database [' . $db->connect_errno . ']');
  18. }
  19. $sqllogin = "SELECT * FROM users WHERE users.username = '$username' and passwd = '$password'";
  20. if ($result = $con->query($sqllogin)){
  21. $row_cnt = mysqli_num_rows($result);
  22. if ($row_cnt > 0){
  23. while ($row = $result->fetch_array()){
  24. $uname = $row['username'];
  25. $uid = $row['userid'];
  26. $_SESSION['username'] = $uname;
  27. $_SESSION['userid'] = $uid;
  28. }
  29. header("refresh:1;url=index.php");
  30. echo 'You have successfully logged in ...<BR />Returning to index in a few seconds</CENTER>';
  31. } else {
  32. echo 'That was not a valid username or password!<BR /><BR />';
  33. echo 'Please try again <A HREF="index.php" CLASS="navlink">here</A></CENTER>';
  34. }
  35. }
  36. include_once ('footer.php');
  37. ?>