Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!

Join Today!

[Share] registering script for PHP

Joined
Sep 9, 2008
Messages
3
Reaction score
0
This is a simple code that uses php to register an account.
currently it does not do anything else but register an account.

what it does:
encode password CORRECTLY (it md5 hashes it WITH kikugalanet)
automatically make a mysql entry for the account
check if the username or the ID code do not already exist
The ID codes are in a logical order now.

I'm planning to making this a nice little add-on to the game, where one can change co
 
Last edited:
I had already posted a similar code like this a few pages ago, didn't hash it correctly but it looks like it would work...
 
0=banned
100=normal
800=gm
It not working when i test if the register and when i put the id and pass to test. Then it say

<?
include 'md5.php';
include 'connect.php';

$level='user'; //change 'admin' to 'gm' for GM registration, or to 'user' to register as normal user.

/*
liek this:
$level='gm';
$level='user';
*/


switch($level)
{
case'admin':
$access='1000';
break;
case'gm':
$access='800';
break;
case'user':
$access='100';
break;
default:
$access='100';
break;
}

$q = mysql_query("SELECT * FROM `accounts`");
while($row = mysql_fetch_array($q)){
$id = $row['id'];
}
$id=$id+1;
$user=$_POST['usr'];
if (mysql_fetch_row(mysql_query("SELECT * FROM accounts WHERE username = '$user'"))) {
die ("the username already exists..");
}
$query = "INSERT INTO accounts (id, username, password, accesslevel, logged_in, channelnum, bankpassword, bankpenya1, bankpenya2, bankpenya3)
VALUES ('$id', '$user', '$pwd', $access, '0', '0', '1337', '999999999', '999999999', '999999999')";
mysql_query($query) OR die('error! '.mysql_error());
mysql_close();
echo"You have been registered!";
?>
 
Back