Here you go, I'll be adding this to Release section probly too.
Example Here
All work by me, feel free to change anything.
Upgrade.php
HTML Code:
<head>
<title>Upgrade Account</title>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<style type="text/css" media="screen">
@import url(stats/secondary_stats.css);.style1 {
font-size: 24px;
font-weight: bold;
font-style: italic;
}
</style>
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="stats/pngfix.js"></script>
<![endif]-->
</head>
<body>
<center>
<div class="logo"></div>
<div style="width:300px">
<form action="<?php echo $_SERVER[upgrade.php]; ?>" method="POST">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr class="head"><th colspan="2"><div class="heading"><span class="style1">Upgrade Account</span><br>
<br></div>
<br><br></th></tr>
<tr>
<th>Username: </th><td align="center"><input type="text" name="login" size="30" maxlength="16"/></td>
</tr>
<tr>
<th>Password: </th><td align="center"><input type="password" name="password" size="30" maxlength="16"/></td>
</tr>
<th>Account Type:</th><td align="center">
<p> </p>
<p>
<select name="set" type="select">
<option value="0">Normal WoW</option>
<option value="8">Burning Crusade</option>
<option value="40" selected>Wrath of the Lich King</option>
</select>
<br>
<br>
<input type="reset" name="reset" value="Reset"/>
<input type="submit" name="Update" value="Update" id="Update"/>
</p></td>
</table>
</form>
<?php
include('config.php');
$query = @mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error());
mysql_query($query);
mysql_select_db($db) or die (mysql_error());
$login=$_POST['login'];
$password=$_POST['password'];
$set=$_POST['set'];
$loginlen=strlen($login);
$passwordlen=strlen($password);
$query = "SELECT acct FROM accounts WHERE login = '".$login."' AND password = '".$password."'";
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);
if($loginlen < 1 or $passwordlen < 1)
{
echo "Please fill in the fields";
}
else{
if($numrows == 1)
{
$query = "UPDATE accounts SET flags = '".$set."' WHERE login = '".$login."'";
$result = mysql_query($query) or die(mysql_error());
echo "".$login."'s Account successfully Updated!";
} else {
die("Invalid account name/password!");
};
};
?>
</div>
<div class="footer">
</div>
</center>
</body>
</html>
Config.php
PHP Code:
<?php
$db="logon";
$dbuser="logon";
$dbpass="password";
$dbhost="127.0.0.1";
?>
Let me know if you have any questions or issues.
(I wrote this for arcemu so it should be compatible with both ascent and arc, as far as mangos i don't know.)