Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Php Registration for LOTF

Junior Spellweaver
Joined
Jul 6, 2008
Messages
173
Reaction score
2
Well, steels was a bit messed up, and needed to be edited.

So here the registration for all lotf users.
Code:
<?php
include("config.php");
?>

<?php
$my_connection = mysql_connect($db['info']['host'], $db['info']['user'], $db['info']['pass']);
$my_database = mysql_select_db($db['info']['name']);
?>
<form action="?op=register" method="post">
  <br />
      <font color="#171717">___<font color=white>Username:
      <label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label>
    <input name="submit" type="submit" class="liteoption" value="Register" />
  </p>
</form>
  <?php
if(isset($_POST['submit'])) {
if(!$_POST['user']) {
die('<center><font color=red>You must fill in all of the feilds!</font></center> <BR>');
}
if(!get_magic_quotes_gpc()) {
$user = addslashes($_POST['user']);
$pass = md5($_POST['pass1']);
} else {
$user = $_POST['user'];
$pass = md5($_POST['pass1']);
}
$pass2 = md5($_POST['pass2']);
$check = mysql_query("SELECT * FROM accounts WHERE AccountID = '$user'");
$check2 = mysql_num_rows($check);
if($check2 != '0') {
die("<center><font color=red>Username ".$user." already being used!</font></center>");
}
if($pass != $pass2) {
die('Passwords dont match!');
}

$insert_member = mysql_query("INSERT INTO accounts (AccountID, LogonType) VALUES ('$user', '2')");
if($insert_member) {
echo("<p class='b01'><center><font color=green>Registration Complete! Login with any password!</font></center></p>");
} else {
echo("<p class='b01'><center><font color=red>Registration Failed!</font></center></p>" );
}}
?>

And config.php
Code:
<?php
//==================================DataBase Information======================================

$db['info']['user'] = "root"; //Your Username for MySQL
$db['info']['pass'] = "PASSWORD"; //Your Password for MySQL
$db['info']['host'] = "localhost"; //Your host
$db['info']['name'] = "coproj"; //Your database name

?>
The stuff above is default for lotf accept password

Thanks to steel for having the base of the code :p

Thanks me for making it lotf enabled :p
Thanks IcedEarth for helping a bit

-Virtue
 
Last edited:
C# Developer
Joined
Jan 27, 2008
Messages
541
Reaction score
12
ty for editing it ^^, nice release. Will stop a lot of questions hah
 
Junior Spellweaver
Joined
May 19, 2007
Messages
141
Reaction score
0
Releasing my coding and changing stuff -.- how noobish
 
Experienced Elementalist
Joined
Jan 16, 2008
Messages
291
Reaction score
0
Conquer passwords arnt MD5 Hashes, i beleive ive said this about 10 times now?
 
Junior Spellweaver
Joined
May 19, 2007
Messages
141
Reaction score
0
lawl well they don't know it xD Im using an hash that works to be readed into server & accepted by serv xD
 
Back
Top