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

31 行
1.1 KiB

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