Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 02:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] -Lotf- Lol.. nooby register page.

Discussion on [Release] -Lotf- Lol.. nooby register page. within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2008
Posts: 217
Received Thanks: 26
[Release] -Lotf- Lol.. nooby register page.

Hey yall, I just made a register for a friend over tv cause he couldn't get other one working. This is super simple but works great.. (for noobs mainly )


PHP Code:
<html>
<head>
<title>Register.</title>
</head>
<body>
<center>
<h1>Register to play.</h1>
<form action="register.php?register=yes" method="post">
<b>Username:</b> <input type="text" name="user"><br>
<b>Password:</b> <input type="password" name="pass"><br>
<input type="submit" value="Register">
</form>
</center>
</body>
</html>


<?php
//connect to the database.

$dbhost 'localhost'//keep as localhost
$dbuser 'root'//keep as root
$dbpass ''//enter in your password for your database.
$dbname 'coproj'//probabally coproj

$conn mysql_connect($dbhost$dbuser$dbpass);
    

    
mysql_select_db($dbname);
    


$user $_POST['user'];
$pass md5($_POST['pass']);

    
mysql_query("INSERT INTO accounts (AccountID, Password, LogonType, LogonCount) VALUES ('$user','$pass','2','1')");
    
    if (
$_GET['register'] == "yes") {
        echo 
"Thank you for registering you may now play.";
    }
?>
Instructions.

1.Put apache password in here ---> ''; after it sais $dbpass. Password goes in between single quotes.

2. Upload and your done :s..
demonscim is offline  
Thanks
4 Users
Old 10/29/2008, 18:48   #2
 
elite*gold: 0
Join Date: Jan 2008
Posts: 145
Received Thanks: 91
Correction,
LogonType is not 1 for the new account. It should 2(making new char).
And i think the Password is not coded as MD5.
pauldexter is offline  
Thanks
2 Users
Old 10/29/2008, 19:10   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 217
Received Thanks: 26
Very sorry, thank you and for the encryption.. who cares as i said nooby .. not worried about it its just for those noobs that can't work any other register.
demonscim is offline  
Old 10/29/2008, 20:42   #4
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
nice release a +thanks for you because you did so much work


ps/ i added it under helpfull threads in my all-in-1 thread ok?
XxArcherMasterxX is offline  
Old 10/29/2008, 20:48   #5
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
heres mutch etter one I'v made !
PHP Code:
<?php
$db
['info']['user'] = "root"//Your Username for MySQL
$db['info']['pass'] = "PASS"//Your Password for MySQL
$db['info']['host'] = "localhost"//Your host
$db['info']['name'] = "coproj"//Your database name
?>

<?php
$my_connection 
mysql_connect($db['info']['host'], $db['info']['user'], $db['info']['pass']);
$my_database mysql_select_db($db['info']['name']);
?>

<body>
<form action="?op=register" method="post">
  <div align="center"><br />
  </div>
  <p align="center"><strong>Account Creation !</strong></p>
  <table width="280" border="0" align="center">
    <tr>
      <td width="132" height="20" class="b01">Username:</td>
      <td width="196"><label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label></td>
    </tr>
    <tr>
      <td height="25" class="b01">Password:</td>
      <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Repeat Password: </td>
      <td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
    </tr>
  </table>
  <p align="center">
    <input name="submit" type="submit" class="liteoption" value="Register" />
  </p>


<div align="center">
  <?php
if(isset($_POST['submit'])) {
if(!
$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die(
'You must fill in all of the feilds!!!<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(
"Username: '".$user."' is in use!");
}
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'>Registration Complete! <a href=index.php>Click here</a>");
} else {
echo(
"<p class='b01'>Registration Failed!</p>");
}}
?>
$HaDoW is offline  
Old 10/30/2008, 12:29   #6
 
elite*gold: 0
Join Date: Feb 2008
Posts: 217
Received Thanks: 26
Why all the unnecessary work, and why did u user arrays .. I'm not in competition buddy.. I was just helping out teh noobs.. and ty archer.
demonscim is offline  
Old 01/18/2009, 02:59   #7
 
elite*gold: 0
Join Date: Jan 2009
Posts: 37
Received Thanks: 19
@$HaDoW thats off the CMS website
kophtus is offline  
Old 01/31/2009, 19:02   #8
 
elite*gold: 0
Join Date: Jan 2009
Posts: 112
Received Thanks: 1
very good guide but i want to know where i have to put all these... plz some1 can help me?
stratos93 is offline  
Old 01/31/2009, 20:07   #9
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
I seriously think of starting to learn a bit PHP. Any decent person willing to teach me some? Thanks in advance
_Emme_ is offline  
Reply


Similar Threads Similar Threads
[RELEASE]Awesome LOTF register page!
09/20/2009 - CO2 PServer Guides & Releases - 21 Replies
In this page u can add register code of 5017,5065 and 5095. This page has added only 5017 register code. Download: LINK A screenshot of the page. http://www.imagehost.ro/pict/192244244ab534982831 e.png
[Release]Advanced LOTF Reg page
08/14/2009 - CO2 PServer Guides & Releases - 7 Replies
Hello all :) This is a register page i made for my server. It uses PHP, all you have to do is change the settings in 'settings.php', upload it. Voilah! here it is... Press thanks if i helped you!
[Release] -Lotf- Changepassword, Must use my register as well.
10/31/2008 - CO2 Private Server - 5 Replies
//Close!//Delete!



All times are GMT +1. The time now is 02:10.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.