Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 18:11

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

Advertisement



[Help]Problem with reg page

Discussion on [Help]Problem with reg page within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
[Help]Problem with reg page

ok i did all . But when i go to reg.htm i get this .

im using appserver.


Code:
>>>> YOUR_DATABASE <<<<< AND replace it with your database NAME! // Xsense ////////////////////////////////////////////////////////////////////////////////////// $mssql = array( 'host' => "N0601-SAN\SQLEXPRESS", //Your mssql host goes here 'user' => "sa", //Your mssql username goes here 'pass' => "1234" //Your mssql password goes here ); function anti_injection($sql) { $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql); $sql = trim($sql); $sql = strip_tags($sql); $sql = addslashes($sql); return $sql; } if($_POST['activ'] == '1') { $accname = anti_injection($_POST['accname']); $accpass1 = anti_injection($_POST['accpass1']); $accpass2 = anti_injection($_POST['accpass2']); $con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']); $result1 = mssql_query("SELECT * FROM N0601-SAN\SQLEXPRESS.dbo.users WHERE id = '".$accname."'",$con); $row1 = mssql_num_rows($result1); if(empty($accname) || empty($accpass1) || empty($accpass2)|| empty($accname)) { echo "
You didnt fill in all fieldsGo Back"; } elseif($row1 > '0' || $row2 > '0') { echo "
This Account name already exists.Go Back"; } elseif($accpass1 != $accpass2) { echo "
The passwords did not matchGo Back"; } elseif($accpass1 == $accname) { echo "
Account name and password are the same.Go Back"; } elseif(!preg_match("/^[0-9a-zA-Z]{3,15}$/i", $accname)) { echo "
Enter a account name only with 0-9 , a-z and A-Z.Go Back"; } elseif(!preg_match("/^[0-9a-zA-Z]{3,15}$/i", $accpass1)) { echo "
Enter a password only with 0-9 , a-z and A-Z.Go Back"; } elseif(strlen($accname) < 3 || strlen($accname) > 15) { echo "
Username Must be above 3 and lower then 15 Go Back"; } elseif(strlen($accpass1) < 3 || strlen($accpass1) > 15) { echo "
Password Must be above 3 and lower then 15 .Go Back"; } else { $accpass = md5($accpass1); $con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']); mssql_query("INSERT INTO N0601-SAN\SQLEXPRESS.dbo.users ( id, password, online, unknown, unknown2, silk, gold ) VALUES ( '".$accname."', '".$accpass."', '0', '0', '0', '0', '0' )",$con); ?>



here is my reg.htm
Code:
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #FFFFFF;
}
body {
	background-color: #000000;
}
-->
</style>
<?php
//////////////////////////////////////////////////////////////////////////////////////
// IMPORTANT!!!!!!
// SEARCH FOR >>>>> N0601-SAN\SQLEXPRESS <<<<< AND replace it with your database NAME!
// Xsense
//////////////////////////////////////////////////////////////////////////////////////
$mssql = array(
		'host' => "N0601-SAN\SQLEXPRESS",		//Your mssql host goes here
		'user' => "sa",		//Your mssql username goes here
		'pass' => "1234"		//Your mssql password goes here
	);

function anti_injection($sql) {
   $sql 			= preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
   $sql 			= trim($sql);
   $sql 			= strip_tags($sql);
   $sql 			= addslashes($sql);
   return $sql;
}

if($_POST['activ'] == '1') {

		$accname 		= anti_injection($_POST['accname']);
		$accpass1 		= anti_injection($_POST['accpass1']);
		$accpass2 		= anti_injection($_POST['accpass2']);
		$con 			= mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
		$result1 		= mssql_query("SELECT * FROM N0601-SAN\SQLEXPRESS.dbo.users WHERE id = '".$accname."'",$con);
		$row1 			= mssql_num_rows($result1);
		
		if(empty($accname) || empty($accpass1) || empty($accpass2)|| empty($accname)) {
			echo "<br>You didnt fill in all fields<a href='javascript:history.back()'>Go Back</a>";
		} elseif($row1 > '0' || $row2 > '0') {
			echo "<br>This Account name already exists.<a href='javascript:history.back()'>Go Back</a>";
		} elseif($accpass1 != $accpass2) {
			echo "<br>The passwords did not match<a href='javascript:history.back()'>Go Back</a>";
		} elseif($accpass1 == $accname) {
			echo "<br>Account name and password are the same.<a href='javascript:history.back()'>Go Back</a>";
		} elseif(!preg_match("/^[0-9a-zA-Z]{3,15}$/i", $accname)) {
			echo "<br>Enter a account name only with 0-9 , a-z and A-Z.<a href='javascript:history.back()'>Go Back</a>";
		} elseif(!preg_match("/^[0-9a-zA-Z]{3,15}$/i", $accpass1)) {
			echo "<br>Enter a password only with 0-9 , a-z and A-Z.<a href='javascript:history.back()'>Go Back</a>";
		} elseif(strlen($accname) < 3 || strlen($accname) > 15) {
			echo "<br>Username Must be above 3 and lower then 15 <a href='javascript:history.back()'>Go Back</a>";
		} elseif(strlen($accpass1) < 3 || strlen($accpass1) > 15) {
			echo "<br>Password Must be above 3 and lower then 15 .<a href='javascript:history.back()'>Go Back</a>";
		} else {

		$accpass 		= md5($accpass1);
		$con 			= mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
						  mssql_query("INSERT INTO N0601-SAN\SQLEXPRESS.dbo.users (
						  											id,
																	password,
																	online,
																	unknown,
																	unknown2,
																	silk,
																	gold
																)
														VALUES 	(
																	'".$accname."',
																	'".$accpass."',
																	'0',
																	'0',
																	'0',
																	'0',
																	'0'
																)",$con);
?>
	<center>
		<table width="500">
			<tr>
	  			<td colspan='2' align='center'><img src="top.jpg" width="500" height="300" /></td>
			</tr>
			<tr>
	  			<td colspan="2" align="center" bgcolor="#333333">
					Welcome to srevolution! Below are your details! Keep them safe!
				</td>
			</tr>
			<tr>
	  			<td bgcolor="#666666">
					Account name: 
				</td>
				<td bgcolor="#666666">
					<b><?php echo "".$accname.""; ?></b>
				</td>
			</tr>
			<tr>
	  			<td bgcolor="#333333">
					Your password: 
				</td>
				<td bgcolor="#333333">
					<b><?php echo "".$accpass1.""; ?></b>
				</td>
			</tr>
		</table>
	</center>

<?php
		}

} else {

	$con 			= mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
	$result1 		= mssql_query("SELECT * FROM N0601-SAN\SQLEXPRESS.dbo.users",$con);
	$row1 			= mssql_num_rows($result1);
?>	

	<form action='reg.php' method='POST'>
		<center>
			<table width="500">
				<tr>
	  				<td colspan='2' align='center'>
						<img src="top.jpg" width="500" height="300" />
					</td>
				</tr>
				<tr>
					<td bgcolor="#333333">Account Name</td>
					<td bgcolor="#333333">
						<input type='text' name='accname' maxlength='12'>
					</td>
				</tr>
				<tr>
					<td bgcolor="#666666">Password</td>
					<td bgcolor="#666666">
						<input type='password' name='accpass1' maxlength='12'>
					</td>
				</tr>
				<tr>
					<td bgcolor="#333333">Again pass.</td>
					<td bgcolor="#333333">
						<input type='password' name='accpass2' maxlength='12'>
					</td>
				</tr>
				<tr>
					<td align='center' bgcolor="#666666">
					</td>
	  				<td align='right' bgcolor="#666666">
						<input type='hidden' name='activ' value='1' />
        				<input name="submit" type='submit' value='Create Account' />
					</td>
				</tr>
			</table>
		</center>
	</form>
	
<?php
}
?>







IF i use other reg page. then here

i get Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\reg.php on line 115
* White * is offline  
Old 08/11/2011, 17:07   #2
 
soulmore's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 117
Received Thanks: 12
which is the line 115? i can´t find it in your reg.php i copied it in editplus and get this one but not sure...

Code:
$con 			= mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
It seems to be a problem with your user and password in the database, check it and change in case it needs in your mysql.

If you can acces to your tables inside the database using phpmyadmin i can´t solve this.
Hope this clue helps you to solve the problem and sorry for my poor english
soulmore is offline  
Old 08/11/2011, 17:50   #3
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
guys i readded all . now i get this.

arning: mssql_query(): message: Invalid column name 'unknown'. (severity 16) in c:\appserv\www\reg.php on line 79

Warning: mssql_query(): message: Invalid column name 'unknown2'. (severity 16) in c:\appserv\www\reg.php on line 79

Warning: mssql_query(): Query failed in c:\appserv\www\reg.php on line 7
* White * is offline  
Old 08/11/2011, 17:58   #4
 
soulmore's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 117
Received Thanks: 12
At the end of this guide you have a complete set for reg.php. Hope it helps credit to the author

soulmore is offline  
Old 08/11/2011, 18:00   #5
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by soulmore View Post
At the end of this guide you have a complete set for reg.php. Hope it helps credit to the author

i used that guide.
* White * is offline  
Old 08/11/2011, 18:05   #6
 
soulmore's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 117
Received Thanks: 12
I found the problem i think. PHP can´t connect to your database because you have this in your database

Code:
'host' => [b][color=red]"N0601-SAN\SQLEXPRESS"[/color][/b],		//Your mssql host goes here
		'user' => "sa",		//Your mssql username goes here
		'pass' => "1234"		//Your mssql password goes here
You should change it to your database host . Easy!!
soulmore is offline  
Old 08/11/2011, 19:03   #7
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by soulmore View Post
I found the problem i think. PHP can´t connect to your database because you have this in your database

Code:
'host' => [b][color=red]"N0601-SAN\SQLEXPRESS"[/color][/b],		//Your mssql host goes here
		'user' => "sa",		//Your mssql username goes here
		'pass' => "1234"		//Your mssql password goes here
You should change it to your database host . Easy!!
what ? then what my database host ?

on line 90 i have this code
Code:
)",$con);
?>

here. when i start game andlogin server.

* White * is offline  
Old 08/11/2011, 19:05   #8
 
elite*gold: 0
Join Date: Apr 2011
Posts: 81
Received Thanks: 12
* White *
can you make a tutorial, how to make a server with new srx +reg .... a ? or you can upload you srx ?
insertcoi is offline  
Old 08/11/2011, 19:10   #9
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by insertcoi View Post
* White *
can you make a tutorial, how to make a server with new srx +reg .... a ? or you can upload you srx ?
there is tutorial lol ;D


someone help .. . I opened server, status is good login and game server show on. But why i cant register ?
* White * is offline  
Old 08/11/2011, 19:14   #10
 
elite*gold: 0
Join Date: Apr 2011
Posts: 81
Received Thanks: 12
) i know ..
insertcoi is offline  
Old 08/11/2011, 19:22   #11
 
evolution007's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 284
Received Thanks: 90
your database host name:

in blue background
evolution007 is offline  
Old 08/11/2011, 19:26   #12
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
i know this,its changed...
All good,stas,but when i press create acount then i got that eror
* White * is offline  
Old 08/11/2011, 19:30   #13
 
elite*gold: 0
Join Date: Apr 2011
Posts: 81
Received Thanks: 12
White you are use this srx ?
insertcoi is offline  
Old 08/11/2011, 19:38   #14
 
evolution007's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 284
Received Thanks: 90
Quote:
Originally Posted by insertcoi View Post
White you are use this srx ?
this one is old srevo he is using srx
evolution007 is offline  
Old 08/11/2011, 19:39   #15
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Quote:
Originally Posted by insertcoi View Post
White you are use this srx ?
Yea.but im waiting new Limex
* White * is offline  
Reply


Similar Threads Similar Threads
Problem mit Acc Page
07/25/2010 - WoW Private Server - 4 Replies
Mal ne frage, Ich wollt mir ne wow acc page machen Kann darauf aber nur Local zugreifen also localhost/wow2 wollte das mit dyndns machen geht aber auch nicht der ordner liegt bei xampp im htdocs wo auch schon alles rausgelöscht wurde ports 80 81 3306 etc sind bereits freigeschaltet
Problem with reg page
07/17/2010 - CO2 Private Server - 10 Replies
Hello all i a have problem in my register page cant register cuz no have his account_zf this my link register page to see it http://41.178.124.22/co/index1.htm or Part One - Account Information
Problem mit acc page
07/04/2010 - WoW Private Server - 6 Replies
hi ich habe ein problem mit meiner acc page ich habe sie auf bplaced.net hochgeladen und habe alles richtig eingetragen und wenn ich drauf gehe steht da Error: Unable to connect to MySQL server. MySQL reported: mysqlnd cannot connect to MySQL 4.1+ using old authentication.:rtfm: pls help:handsdown: bitte *NICHT*auf die rechtschreibfehler achten
Reg. Page Problem
03/10/2010 - Metin2 Private Server - 5 Replies
Hallo,habe nen problem mit meiner Regi page... alsoo der server is an xampp is an appache und mysql is an die leute sind im hamachi netzwerk ,aber wenn sie auf die regipage (http://5.106.100.11) gehen kommt seitenladefehler und wenn sie http://5.106.100.11:8080 eingeben kommt auch seitenladefehler... ich selber kann auf die reg page zugreifen und auch accs erstellen..was is falsch? Gebe gerne Thx :)
reg page problem
07/17/2009 - Dekaron Private Server - 4 Replies
http://i30.tinypic.com/2ewd5lk.png what does that mean?



All times are GMT +1. The time now is 18:12.


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.