Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

33 行
1.2 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" type="text/css" href="style.css">
  5. <?php
  6. if (session_status() == PHP_SESSION_NONE) {
  7. session_start();
  8. }
  9. include_once ('connect.php');
  10. //$newuser = $_POST['reguser'];
  11. $con = mysqli_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  12. if ($con->connect_errno){
  13. die ('Unable to connect to database [' . $db->connect_errno . ']');
  14. }
  15. if (empty($_POST['reguser'])){
  16. // this block contains the code to fill out the form
  17. echo '<center>';
  18. include_once ('includes/account-registration.php');
  19. echo '</center><br />';
  20. } else {
  21. include_once ('includes/verifications.php');
  22. // this block validates input, and if passed, inserts it into the database
  23. $hashedpass = password_hash($_POST['userpass1'], PASSWORD_DEFAULT);
  24. $stmt = $con->prepare("INSERT INTO userinfo (username, userpass, usermail) VALUES (?, ?, ?)");
  25. $stmt->bind_param("sss", $username, $hashedpass, $verifyemail);
  26. $stmt->execute();
  27. echo '<center>Account created, please <a href="index.php">login</a> to continue<br /><br />';
  28. session_destroy();
  29. exit();
  30. }
  31. echo '<center>Back to <a href="index.php" class="navlink">home page</a><br />';
  32. include_once ('footer.php');
  33. ?>