Register for your free account! | Forgot your password?

You last visited: Today at 14:00

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

Advertisement



[HELP] Register Page

Discussion on [HELP] Register Page within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 45
Received Thanks: 17
[HELP] Register Page




how can i fix that

and my index.php


<?php
/* Simple registration page for silkroad server, by Chernobyl
* Settings are at _inc/config.php
* If you get an mssql connection error, while defining totally correct data
* Just use older ntwdblib.dll for your webserver
*/
require_once('_inc/security.class.php');
require_once('_inc/config.php');

if(!isset($_POST['submit']))
{
echo "<table border='1'>
<form method='post'>
<td>Username</td><td><input type='text' name='username' maxlength='16'></td><tr/>
<td>Password[1]</td><td><input type='password' name='pw1' maxlength='32'></td><tr/>
<td>Password[2]</td><td><input type='password' name='pw2' maxlength='32'></td><tr/>
<td></td><td><input type='submit' name='submit' value='Register'></td>
</form>
</table>";
}
else
{
if(strlen($_POST['username']) < 3) $msg[] = "Username too short";
if(strlen($_POST['username']) > 16)$msg[] = "Username too long";
if(strlen($_POST['pw1']) < 6) $msg[] = "Password [1] too short";
if(strlen($_POST['pw1']) > 32)$msg[] = "Password [1] too long";
if(strlen($_POST['pw2']) < 6) $msg[] = "Password [2] too short";
if(strlen($_POST['pw']) > 32) $msg[] = "Password [2] too long";
if($_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";

$sec = new security();

if($sec->is_secure($_POST['username']) == false) $msg[] = "Username contains forbidden symbols";
if($sec->is_secure($_POST['pw1']) == false) $msg[] = "Password [1] contains forbidden symbols";
if($sec->is_secure($_POST['pw2']) == false) $msg[] = "Password [2] contains forbidden symbols";

if(count($msg) > 0)
{
for($i = 0; $i < count($msg); $i++)
{
echo $msg[$i]."<br/>";
}
return;
}
else
{
//checking damn mssql stuff
$accountExists = mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));
if($accountExists > 0) echo "Account with such username already exists<br/>";
else
{
$pwd = md5($_POST['pw1']);
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_seconda ry) values('$_POST[username]','$pwd','3','3')");
echo "Account successfully created<br/>";
}
}


}



help please
07lord0707 is offline  
Old 09/23/2011, 17:02   #2
 
ByMnkn's Avatar
 
elite*gold: 61
Join Date: Sep 2011
Posts: 341
Received Thanks: 57
Quote:
Originally Posted by 07lord0707 View Post



how can i fix that

and my index.php


<?php
/* Simple registration page for silkroad server, by Chernobyl
* Settings are at _inc/config.php
* If you get an mssql connection error, while defining totally correct data
* Just use older ntwdblib.dll for your webserver
*/
require_once('_inc/security.class.php');
require_once('_inc/config.php');

if(!isset($_POST['submit']))
{
echo "<table border='1'>
<form method='post'>
<td>Username</td><td><input type='text' name='username' maxlength='16'></td><tr/>
<td>Password[1]</td><td><input type='password' name='pw1' maxlength='32'></td><tr/>
<td>Password[2]</td><td><input type='password' name='pw2' maxlength='32'></td><tr/>
<td></td><td><input type='submit' name='submit' value='Register'></td>
</form>
</table>";
}
else
{
if(strlen($_POST['username']) < 3) $msg[] = "Username too short";
if(strlen($_POST['username']) > 16)$msg[] = "Username too long";
if(strlen($_POST['pw1']) < 6) $msg[] = "Password [1] too short";
if(strlen($_POST['pw1']) > 32)$msg[] = "Password [1] too long";
if(strlen($_POST['pw2']) < 6) $msg[] = "Password [2] too short";
if(strlen($_POST['pw']) > 32) $msg[] = "Password [2] too long";
if($_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";

$sec = new security();

if($sec->is_secure($_POST['username']) == false) $msg[] = "Username contains forbidden symbols";
if($sec->is_secure($_POST['pw1']) == false) $msg[] = "Password [1] contains forbidden symbols";
if($sec->is_secure($_POST['pw2']) == false) $msg[] = "Password [2] contains forbidden symbols";

if(count($msg) > 0)
{
for($i = 0; $i < count($msg); $i++)
{
echo $msg[$i]."<br/>";
}
return;
}
else
{
//checking damn mssql stuff
$accountExists = mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));
if($accountExists > 0) echo "Account with such username already exists<br/>";
else
{
$pwd = md5($_POST['pw1']);
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_seconda ry) values('$_POST[username]','$pwd','3','3')");
echo "Account successfully created<br/>";
}
}


}



help please
Restart PC again try
ByMnkn is offline  
Old 09/23/2011, 17:20   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 490
Received Thanks: 149
This Page Dont Need Hamachi Need To Be Hosted
hamada619 is offline  
Old 09/23/2011, 17:33   #4
 
sercankd's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 273
Received Thanks: 135
you are missing security.class.php in _inc folder
sercankd is offline  
Old 09/23/2011, 17:38   #5
 
elite*gold: 0
Join Date: Dec 2009
Posts: 45
Received Thanks: 17
Quote:
Originally Posted by sercankd View Post
you are missing security.class.php in _inc folder
can u help me from teamviewer ?
07lord0707 is offline  
Old 09/23/2011, 17:56   #6
 
LastTim3's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 275
Received Thanks: 85
anyone pls can help me with this ?


Uploaded with
LastTim3 is offline  
Old 09/23/2011, 18:44   #7
 
elite*gold: 0
Join Date: Dec 2009
Posts: 45
Received Thanks: 17
thanks solved problems
07lord0707 is offline  
Closed Thread


Similar Threads Similar Threads
Register Page ?
12/12/2014 - Dekaron Private Server - 3 Replies
Hi any one can help me with my register page ? i dont now it and i dont now how i can make accounts manuel :( icq: 402251110
register page
04/30/2010 - Cabal Private Server - 1 Replies
hiya i need help to make a register page could some one please help me to make one i really need help or send me a link for tutorial thanks i need simple nice layout could anyone please help me
[HELP] register page
04/23/2010 - Conquer Online 2 - 0 Replies
#request close i figured it out I don't know if this is the correct place to post this i'm sorry but i'm still a noob But i set up my register page and i get a weird error heres a picture of it: http://i922.photobucket.com/albums/ad68/borntohun t9944/helpmeplease.jpg Can anyone help me with that?
Register page
02/18/2010 - CO2 Private Server - 8 Replies
I tried using this register page. http://www.elitepvpers.com/forum/co2-pserver-guide s-releases/381506-release-simple-regpage-5165-a.ht ml But every account I use it says wrong account or password, anyone know whats wrong? I'm not much of a php person lmao.
Register page
01/13/2009 - CO2 Private Server - 10 Replies
Hey. can somebody help me to create register page... I'm using MySQL & Power Source database... I have no idea how i can create register page. So...can somebody write here some guide or smth ?



All times are GMT +1. The time now is 14:01.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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