Please some help here!!!

04/19/2012 18:43 macmac98#1
I have a cool private server (5530)and i don't know how to create register page!!!Please help me.:(:(:(
04/19/2012 18:45 turk55#2
if its not so hard, why not learn it ?
04/20/2012 02:25 ~Zero~#3
If you have a cool private server, PHP wouldn't be a pain in the ass to learn since you know such a great programming language as C#. /sarcasm
04/20/2012 06:13 awesome100able#4
The appserver php :) It's very excellent ask some friend to help you out.

I can update your client version to 5375 if you would like?
04/20/2012 17:14 Angellinho#5
Quote:
Originally Posted by awesome100able View Post
[...] It's very excellent ask some friend to help you out.[...]
Really?!?! "very excellent" ?!
Whatever...

Asked Google to see what`s thinking about your register page while having a cool server?

[Only registered and activated users can see links. Click Here To Register...]
04/21/2012 05:57 awesome100able#6
Quote:
Originally Posted by Angellinho View Post
Really?!?! "very excellent" ?!
Whatever...

Asked Google to see what`s thinking about your register page while having a cool server?

[Only registered and activated users can see links. Click Here To Register...]
Ok? It does not work .... or im doing something wrong? I'm using 5095/ tryed 5165 help me if you please :O [Only registered and activated users can see links. Click Here To Register...] ... Will help you macmac.

Really?!?! "very excellent" ?! just giving this guy words of wisdom.
04/21/2012 11:07 Angellinho#7
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(DBHostDBUserDBPass);
        
$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) > && strlen($Username) < 15)
            {
                if(
eregi("^([0-9a-z])+$"$Username))
                {
                    if(!
$this->UsernameExists($Username))
                    {
                        if(
$Password == $Password2)
                        {
                            if(
strlen($Password) > && 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/21/2012 16:21 diedwarrior#8
Quote:
Originally Posted by awesome100able View Post
The appserver php :) It's very excellent ask some friend to help you out.

I can update your client version to 5375 if you would like?
so basically he got a 5530 source(even tho he doesnt, prolly a 5509)and you're going to update it to 5375..... wow dude you keep amazing me with your posts...
04/21/2012 19:04 Angellinho#9
Quote:
[...]ask some friend to help you out.[...]
That`s the option "call a friend".