|
You last visited: Today at 11:27
Advertisement
[HELP]5530 reg page!
Discussion on [HELP]5530 reg page! within the CO2 Private Server forum part of the Conquer Online 2 category.
04/20/2012, 12:30
|
#1
|
elite*gold: 0
Join Date: Apr 2010
Posts: 8
Received Thanks: 0
|
[HELP]5530 reg page!
Please can someone give me "www" folder to make register page for 5530 server!!i give thx
|
|
|
04/20/2012, 13:49
|
#2
|
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
|
going to just guess that ur looking for one for Albetros so just check my signature, if you have any issues let me know..
|
|
|
04/21/2012, 19:12
|
#3
|
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
|
In fact, you asked for that,
Just kidding. I told you in an older post how to make a register page that`s gonna work on with your source.
Quote:
Originally Posted by Angellinho
Make a file called "config.php"
Paste this code inside it:
PHP Code:
<?php
define("DBHost", "localhost"); define("DBName", "your database"); define("DBUser", "your mysql user"); define("DBPass", "your mysql password");
class Database { protected $connection; protected $database;
public function __construct() { echo $settings['DBUser']; $this->connection = @mysql_connect(DBHost, DBUser, DBPass); $this->database = @mysql_select_db(DBName); }
Edit the following, DBName, DBUser, DBPass.
Below such in config.php add this code. You have nothing to edit there if you`re using it for 55xx version.
PHP Code:
//don`t edit anything below function ProcRegister($Username, $Password, $Password2, $email) { if($Username != "" && $Password != "" && $Password2 != "" && $email != "") { if(strlen($Username) > 5 && strlen($Username) < 15) { if(eregi("^([0-9a-z])+$", $Username)) { if(!$this->UsernameExists($Username)) { if($Password == $Password2) { if(strlen($Password) > 6 && strlen($Password) < 20) { $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*"."@[a-z0-9-]+(\.[a-z0-9-]{1,})*"."\.([a-z]{2,}){1}$"; if(eregi($regex, $email)) { $this->completeRegister($Username, $Password, $email); } else { echo '<div style="padding:0px;line-height:19px;"><center>Please enter your E-mail address!</div></center></font>'; } } else { echo '<div style="padding:0px;line-height:19px;"><center>Password should be 6-20 characters!</div></center>'; } } else { echo '<div style="padding:0px;line-height:19px;"><center>Confirm Password should be 6-20 characters!</div></center>'; } } else { echo '<div style="padding:0px;line-height:19px;"><center>This account has been taken. Please a different username!</div></center>'; } } else { echo '<div style="padding:0px;line-height:19px;"><center>Account ID should have only letters or/and numbers!</div></center>'; } } else { echo '<div style="padding:0px;line-height:19px;"><center>Account ID should be 5-15 characters!</div></center>'; } } else { echo '<div style="padding:0px;line-height:19px;"><center>Type in all of the Required fields</div></center>'; } } //here you edit private function completeRegister($Username, $Password, $email) { $ip = $_SERVER['REMOTE_ADDR']; $sql = "INSERT INTO `accounts table` (`Username table`, `Password table`, `Email table`) VALUES ('$Username', '$Password', '$email')"; if($sql = mysql_query($sql, $this->connection)) { echo '<center>Account was created successfully. </center> '; } else { echo '<div style="padding:0px;line-height:19px;"><center>Unknown Error processing your requests. We are Sorry!</div></center>'; } } private function UsernameExists($Username) { $sql = "SELECT * FROM `accounts table` WHERE `Username table` = '$Username'"; $sql = @mysql_query($sql, $this->connection); $sql = @mysql_num_rows($sql); if($sql > 0) { return true; } else { return false; } } } $db = new Database(); ?>
Then save the config.php to www or however is called your web directory.
Create a new file this one called however you want, for example (register.php or reg.php).
Place this code inside it:
HTML Code:
<?php
session_start();
@require_once("config.php");
if(!isset($_SESSION['user']))
{ $_SESSION['user'] = ""; }
if(!isset($_SESSION['email']))
{ $_SESSION['email'] = ""; }
if(isset($_POST['submit']))
{
$_SESSION['user'] = $_POST['user'];
$_SESSION['email'] = $_POST['email'];
$db->ProcRegister($_POST['user'], $_POST['pass'], $_POST['pass2'], $_POST['email']);
}
echo '<br/>
<form method="post" action="">
<h1>Register Account</h2>
<label for="rusername">USERNAME</label>
<input class="ffield" type="text" value="" placeholder="username" id="rusername" name="user" value="'.$_SESSION['user'].'" /><br/>
<label for="rpassword1">PASSWORD</label>
<input class="ffield" type="password" value="" placeholder="password" name="pass" value="" /><br/>
<label for="rpassword2">CONFIRM PASSWORD</label></div>
<input class="ffield" type="password" value="" placeholder="repeat password" name="pass2" value="" /><br/>
<label for="remail">EMAIL</label>
<input class="ffield" type="text" placeholder="email" required name="email" value="'.$_SESSION['email'].'" /><br/>
<button name="submit" id="Submit" type="submit" class="negative button">Submit</button>
</form>
';?>
Wow, now you`re having your own register.
|
|
|
|
04/22/2012, 03:09
|
#4
|
elite*gold: 130
Join Date: Oct 2007
Posts: 1,652
Received Thanks: 701
|
Quote:
Originally Posted by Angellinho
In fact, you asked for that,
Just kidding. I told you in an older post how to make a register page that`s gonna work on with your source.
|
you did way to hard with that register lmao
|
|
|
04/22/2012, 09:33
|
#5
|
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
|
if you find that bad should learn about oop register and login xD
|
|
|
|
Similar Threads
|
Register Page 5530.
05/28/2012 - CO2 Private Server - 3 Replies
Anyone know from where can i get that register page?
http://img64.imageshack.us/img64/9758/32378233.th .jpg
Uploaded with ImageShack.us
+Thanks for who tell me xD
Thanks.
|
Help with npc 5530
04/10/2012 - CO2 Private Server - 5 Replies
Hi all !
I've got a problem with my source 5530 (Hellmouth)
All work but ..
Nothing npc works
he said things like this :
The npc : XXXX not scripted
XXXX= a number
Plis it's very boring help me
Thanks
|
help me 5530
03/25/2012 - CO2 Private Server - 0 Replies
Hello guys
I hope to help
I have 3 problems
1 - in some cases, the other player does not appear, but disappear when you move away and return again
2 - Problem appearance of yellow lines in the screen
3 - Skill's Pure 3 characters not only appeared for a period of 1 second
any one help me :)
any one help me
|
Help Source 5530
02/20/2012 - CO2 Private Server - 1 Replies
I Need add NPC Dragon Soul
Help me
|
How to setup register page for 5525/5530
12/06/2011 - CO2 Private Server - 1 Replies
Hey guys, i tried to find how to setup register page but i can`t. Can someone help to set it up. Please help me :S.
My yahoo is [email protected]
add me or write here :D THANKS !
|
All times are GMT +2. The time now is 11:27.
|
|