1. Computing

World of Warcraft PHP Arena Points Calculator

By , About.com Guide

1 of 4

Input your points
If you play World of Warcraft like I do, I'm sure you are familiar with the Arena Points system. Each week a team receives a rating. It is from this rating that the amount of points you will get to spend on gear is calculated. The formulas used to calculate these points are public on their website, but if you want to host a points calculator directly on your personal or guild website, here is how to do it with PHP.

First we will create a simple HTML form for the user to enter their current arena score. Then we will add the PHP to calculate the score. If no score is entered, our first few lines of PHP set the score to the default score of 1500.

 <head> 
 <title>Arena Calculator</title> 
 </head> 
 <body> 

 <h2>Arena Calculator</h2> 

 <form action = "<?php echo $_SERVER["PHP_SELF"]; ?>" 
 method = "GET"> 
 Enter Your Arena Score: 
 <input type = "text" name = "arena_score" size=5> 
 <input type = "submit" name = "Calculate Score"/> 
 </form>

 <?php 
 //If there is no score entered, we will assume the default score of 1500
 $arena_score = $_GET['arena_score'];
 if ($arena_score == "")
 {
 $arena_score = 1500;
 }
 
  1. About.com
  2. Computing
  3. PHP / MySQL
  4. Step By Steps
  5. World of Warcraft Arena Caclulator PHP Script

©2013 About.com. All rights reserved.