Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 rivejä
1.1 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. $con = mysqli_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  11. if ($con->connect_errno){
  12. die ('Unable to connect to database [' . $db->connect_errno . ']');
  13. }
  14. if (empty($_POST['reguser'])){
  15. // this block contains the code to fill out the form
  16. echo '<center>';
  17. include_once ('includes/account-registration.php');
  18. echo '</center><br />';
  19. } else {
  20. include_once ('includes/verifications.php');
  21. // this block validates input, and if passed, inserts it into the database
  22. $hashedpass = password_hash($_POST['userpass1'], PASSWORD_DEFAULT);
  23. $stmt = $con->prepare("INSERT INTO userinfo (username, userpass, usermail) VALUES (?, ?, ?)");
  24. $stmt->bind_param("sss", $username, $hashedpass, $verifyemail);
  25. $stmt->execute();
  26. echo '<center>Account created, please <a href="index.php">login</a> to continue<br /><br />';
  27. session_destroy();
  28. exit();
  29. }
  30. echo '<center>Back to <a href="index.php" class="navlink">home page</a><br />';
  31. include_once ('footer.php');
  32. ?>