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.
 
 
 
 
 

22 line
937 B

  1. <?php
  2. if (isset($_SESSION['userid'])) {
  3. if ($delchar = $con->prepare("DELETE FROM gwchars WHERE charid = ? AND accid = ? AND userid = ?")) {
  4. $delchar->bind_param("iii", $delcharid, $delaccid, $_SESSION['userid']);
  5. for ($i = 0; $i < count($_POST['delcharid']); $i++) {
  6. $delcharid = $_POST['delcharid'][$i];
  7. $delaccid = $_POST['accid'][$i];
  8. $delchar->execute();
  9. }
  10. $delchar->close();
  11. }
  12. // need to delete associate character stats as well. TODO
  13. $nap = $con->prepare("UPDATE userinfo SET prefcharid = 0, prefcharname = 'No default selected' WHERE userid = ?");
  14. $nap->bind_param("i", $_SESSION['userid']);
  15. $nap->execute();
  16. $nap->close();
  17. $_SESSION['prefcharid'] = "0";
  18. $_SESSION['prefcharname'] = "No default selected";
  19. $_SESSION['charprofid'] = "0";
  20. echo 'Character(s) deleted - no preferred character selected.<br /><br />';
  21. }
  22. ?>