PHP Code:
<html>
<head>
<title>Teleport to twin city!</title>
</head>
<body>
<center>
<h1>Twin city teleportation</h1><br>
<form action="twincity.php?teled=yes" method="post">
Account Name : <input type="text" name="acc"><br>
Character Name: <input type="text" name="name"><br>
<input type="submit" value="To Tc!"><br>
</form>
</center>
</body>
</html>
<?php
//Connect to database.
$dbhost = 'localhost'; //keep as localhost.
$dbuser = 'root'; //you should probabally keep root.
$dbpass = ''; //not sure what your pass is so I left blank.
$dbname = 'coproj'; //you should also keep this the same I believe.
$acc = $_POST['acc'];
$name = $_POST['name'];
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname);
mysql_query("UPDATE characters SET LocationX = '429' WHERE Account = '$acc' AND CharName = '$name'");
mysql_query("UPDATE characters SET LocationY = '378' WHERE Account = '$acc' AND CharName = '$name'");
if ($_GET['teled'] == "yes") {
echo "<center>You have been teleported to twin city. You may now login!</center>";
}
mysql_close();
//created by Demonscim/Razar/Scim (please do not remove this).
?>
EDIT:This was a 2 minute script, it works so if you get a problem thats not from the script don't bitch at me.